Skip to content

Commit b96a4bf

Browse files
fix: deprecations
1 parent 2c63fc7 commit b96a4bf

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tests/Symfony/Bundle/Command/OpenApiCommandTest.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
namespace ApiPlatform\Tests\Symfony\Bundle\Command;
1515

1616
use ApiPlatform\OpenApi\OpenApi;
17+
use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait;
1718
use Symfony\Bundle\FrameworkBundle\Console\Application;
1819
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
1920
use Symfony\Component\Console\Tester\ApplicationTester;
@@ -22,9 +23,15 @@
2223

2324
/**
2425
* @author Amrouche Hamza <hamza.simperfit@gmail.com>
26+
*
27+
* TODO Remove group legacy in 4.0
28+
*
29+
* @group legacy
2530
*/
2631
class OpenApiCommandTest extends KernelTestCase
2732
{
33+
use ExpectDeprecationTrait;
34+
2835
private ApplicationTester $tester;
2936

3037
protected function setUp(): void
@@ -114,10 +121,10 @@ private function assertYaml(string $data): void
114121
}
115122

116123
/**
117-
* TODO Remove in 4.0
124+
* TODO Remove in 4.0.
118125
*/
119126
private function handleDeprecations(): void
120127
{
121-
$this->expectDeprecationMessage('The "openapiContext" option is deprecated, use "openapi" instead.');
128+
$this->expectDeprecation('Since api-platform/core 3.1: The "%s" option is deprecated, use "openapi" instead.');
122129
}
123130
}

0 commit comments

Comments
 (0)