From 1b8509c1a2cd299cbc8f4aa4a8d814eff0b0c9f0 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 31 Jan 2020 15:39:07 +0100 Subject: [PATCH] silence PreviewErrorController related deprecations --- Tests/Functional/RequestBodyParamConverterTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Tests/Functional/RequestBodyParamConverterTest.php b/Tests/Functional/RequestBodyParamConverterTest.php index 63d0764cb..b68c9806f 100644 --- a/Tests/Functional/RequestBodyParamConverterTest.php +++ b/Tests/Functional/RequestBodyParamConverterTest.php @@ -11,6 +11,8 @@ namespace FOS\RestBundle\Tests\Functional; +use Symfony\Bundle\TwigBundle\Controller\PreviewErrorController; + class RequestBodyParamConverterTest extends WebTestCase { public function testRequestBodyIsDeserialized() @@ -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');