commit f462a8c5c0a25421b70933ac60da380bf9987eef
parent 524791126807109a0bc20625d31706d0df1716bd
Author: Felicitus <felicitus@felicitus.org>
Date: Wed, 4 Nov 2015 15:09:51 +0100
Load fixtures to ensure the database tables are present
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/PartKeepr/UploadedFileBundle/Tests/TemporaryFileControllerTest.php b/src/PartKeepr/UploadedFileBundle/Tests/TemporaryFileControllerTest.php
@@ -7,6 +7,11 @@ use Symfony\Component\HttpFoundation\File\UploadedFile;
class TemporaryFileControllerTest extends WebTestCase
{
+ public function setUp()
+ {
+ $this->loadFixtures(array());
+ }
+
public function testUploadAction()
{
$client = static::makeClient(true);
@@ -30,6 +35,7 @@ class TemporaryFileControllerTest extends WebTestCase
array('userfile' => $image)
);
+ $this->assertEquals(200, $client->getResponse()->getStatusCode());
$response = json_decode($client->getResponse()->getContent());
$this->assertObjectHasAttribute("success", $response);
@@ -108,6 +114,8 @@ class TemporaryFileControllerTest extends WebTestCase
$response = json_decode($client->getResponse()->getContent());
+ //var_dump($response);
+
$attribute = "@type";
$this->assertObjectHasAttribute($attribute, $response);