commit 7188090923b84ce2755a8aae7a053dba7f9d1995
parent 267ec1e3472153e7bdfcc348186bd9010c94be74
Author: Felicitus <felicitus@felicitus.org>
Date: Sun, 13 Sep 2015 16:54:11 +0200
Removed legacy webcam test case
Diffstat:
1 file changed, 0 insertions(+), 58 deletions(-)
diff --git a/src/PartKeepr/UploadedFileBundle/Tests/WebcamUploadTest.php b/src/PartKeepr/UploadedFileBundle/Tests/WebcamUploadTest.php
@@ -1,58 +0,0 @@
-<?php
-namespace PartKeepr\UploadedFileBundle\Tests;
-
-use Liip\FunctionalTestBundle\Test\WebTestCase;
-
-class WebcamUploadTest extends WebTestCase
-{
- public function testWebcamUploadAction()
- {
- $client = static::createClient();
-
- $file = __DIR__."/Fixtures/files/uploadtest.png";
- $mimeType = "image/png";
- $extension = "png";
-
- $contents = file_get_contents($file);
-
- $fileString = "data:image/png;base64,".base64_encode($contents);
-
- $client->request(
- 'POST',
- '/api/temp_uploaded_files/webcamUpload',
- array(),
- array(),
- array(),
- $fileString
- );
-
- $response = json_decode($client->getResponse()->getContent());
-
- $propertiesToCheck = array(
- "@context",
- "@id",
- "@type",
- "originalFilename",
- "size",
- "type",
- "filename",
- "mimeType",
- "extension",
- "description",
- "legacyExtension",
- );
-
- foreach ($propertiesToCheck as $property) {
- $this->assertObjectHasAttribute($property, $response);
- }
-
- $this->assertEquals(filesize($file), $response->size);
- $this->assertEquals($mimeType, $response->mimeType);
- $this->assertEquals("webcam.png", $response->originalFilename);
- $this->assertEquals($extension, $response->extension);
- $this->assertEquals("tempfile", $response->type);
-
- $property = "@type";
- $this->assertEquals("TempUploadedFile", $response->$property);
- }
-}