Skip to content

Commit 1b8509c

Browse files
committed
silence PreviewErrorController related deprecations
1 parent 3a5c187 commit 1b8509c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Tests/Functional/RequestBodyParamConverterTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace FOS\RestBundle\Tests\Functional;
1313

14+
use Symfony\Bundle\TwigBundle\Controller\PreviewErrorController;
15+
1416
class RequestBodyParamConverterTest extends WebTestCase
1517
{
1618
public function testRequestBodyIsDeserialized()
@@ -30,10 +32,20 @@ public function testRequestBodyIsDeserialized()
3032
}
3133

3234
/**
35+
* Added to the legacy group to not trigger a deprecation. This deprecation is triggered on version 4.4 of
36+
* the TwigBundle where the PreviewErrorController class is deprecated. Since we only make sure not to break
37+
* that controller class, we do not have to care about the deprecations.
38+
*
39+
* @group legacy
40+
*
3341
* @see https://github.com/FriendsOfSymfony/FOSRestBundle/issues/1237
3442
*/
3543
public function testTwigErrorPage()
3644
{
45+
if (!class_exists(PreviewErrorController::class)) {
46+
$this->markTestSkipped();
47+
}
48+
3749
$client = $this->createClient(['test_case' => 'RequestBodyParamConverter']);
3850
$client->request('GET', '/_error/404.txt');
3951

0 commit comments

Comments
 (0)