Open
Description
Hello.
I'm trying to implement a new REST API in my project, but I'm getting the same errors I get when I test liuggio/symfony2-rest-api-the-best-2013-way
: the PUT
HTTP calls are always returned as text/html
(instead of application/json
), and fail in the assertJsonResponse
assertion. The other methods always return application/json
.
Did anyone have the same problem?
PHPUnit 3.7.38 by Sebastian Bergmann.
Configuration read from /Users/rodrigorigotti/Sites/liuggio/symfony2-rest-api-the-best-2013-way/app/phpunit.xml.dist
.....F.F......
Time: 4.93 seconds, Memory: 30.75Mb
There were 2 failures:
1) Acme\BlogBundle\Tests\Controller\PageControllerTest::testJsonPutPageActionShouldModify
Allow: GET, PUT, PATCH
Cache-Control: no-cache
Date: Fri, 24 Oct 2014 17:46:27 GMT
Location: http://localhost/api/v1/pages/16.json
Set-Cookie: MOCKSESSID=5bde664cd92ea4a6054d789e41008cc175afd08a; path=/
Failed asserting that false is true.
/Users/rodrigorigotti/Sites/liuggio/symfony2-rest-api-the-best-2013-way/src/Acme/BlogBundle/Tests/Controller/PageControllerTest.php:199
/Users/rodrigorigotti/Sites/liuggio/symfony2-rest-api-the-best-2013-way/src/Acme/BlogBundle/Tests/Controller/PageControllerTest.php:126
2) Acme\BlogBundle\Tests\Controller\PageControllerTest::testJsonPatchPageAction
Allow: GET, PUT, PATCH
Cache-Control: no-cache
Date: Fri, 24 Oct 2014 17:46:27 GMT
Location: http://localhost/api/v1/pages/18.json
Set-Cookie: MOCKSESSID=8c619cf2c11c32a72a303eb8cd68ba72fbd0becb; path=/
Failed asserting that false is true.
/Users/rodrigorigotti/Sites/liuggio/symfony2-rest-api-the-best-2013-way/src/Acme/BlogBundle/Tests/Controller/PageControllerTest.php:199
/Users/rodrigorigotti/Sites/liuggio/symfony2-rest-api-the-best-2013-way/src/Acme/BlogBundle/Tests/Controller/PageControllerTest.php:175
FAILURES!
Tests: 14, Assertions: 49, Failures: 2.
Metadata
Metadata
Assignees
Labels
No labels