Skip to content

Commit

Permalink
minor #2070 silence PreviewErrorController related deprecations (xabbuh)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.x branch.

Discussion
----------

silence PreviewErrorController related deprecations

Commits
-------

1b8509c silence PreviewErrorController related deprecations
  • Loading branch information
xabbuh committed Jan 31, 2020
2 parents 3a5c187 + 1b8509c commit fc59686
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Tests/Functional/RequestBodyParamConverterTest.php
Expand Up @@ -11,6 +11,8 @@

namespace FOS\RestBundle\Tests\Functional;

use Symfony\Bundle\TwigBundle\Controller\PreviewErrorController;

class RequestBodyParamConverterTest extends WebTestCase
{
public function testRequestBodyIsDeserialized()
Expand All @@ -30,10 +32,20 @@ public function testRequestBodyIsDeserialized()
}

/**
* Added to the legacy group to not trigger a deprecation. This deprecation is triggered on version 4.4 of
* the TwigBundle where the PreviewErrorController class is deprecated. Since we only make sure not to break
* that controller class, we do not have to care about the deprecations.
*
* @group legacy
*
* @see https://github.com/FriendsOfSymfony/FOSRestBundle/issues/1237
*/
public function testTwigErrorPage()
{
if (!class_exists(PreviewErrorController::class)) {
$this->markTestSkipped();
}

$client = $this->createClient(['test_case' => 'RequestBodyParamConverter']);
$client->request('GET', '/_error/404.txt');

Expand Down

0 comments on commit fc59686

Please sign in to comment.