Skip to content

Commit d4dc4f9

Browse files
committed
Fix SwaggerCommandTest
1 parent ab1fbed commit d4dc4f9

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

tests/Bridge/Symfony/Bundle/Command/SwaggerComandTest.php renamed to tests/Bridge/Symfony/Bundle/Command/SwaggerCommandTest.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,24 @@
1111

1212
namespace ApiPlatform\Core\Tests\Bridge\Symfony\Bundle\Command;
1313

14-
use Nelmio\ApiDocBundle\Tests\WebTestCase;
1514
use Symfony\Bundle\FrameworkBundle\Console\Application;
15+
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
1616
use Symfony\Component\Console\Tester\ApplicationTester;
1717

1818
/**
1919
* @author Amrouche Hamza <[email protected]>
2020
*/
21-
class SwaggerComandTest extends WebTestCase
21+
class SwaggerCommandTest extends KernelTestCase
2222
{
2323
public function testExecute()
2424
{
25-
$this->getContainer();
25+
self::bootKernel();
26+
2627
$application = new Application(static::$kernel);
2728
$application->setCatchExceptions(false);
2829
$application->setAutoExit(false);
2930
$tester = new ApplicationTester($application);
30-
$input = [
31-
'command' => 'api:swagger:export',
32-
];
31+
$input = ['command' => 'api:swagger:export'];
3332
$tester->run($input);
3433
$display = $tester->getDisplay();
3534
$this->assertJson($display);

0 commit comments

Comments
 (0)