File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
tests/Bridge/Symfony/Bundle/Command Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 11
11
12
12
namespace ApiPlatform \Core \Tests \Bridge \Symfony \Bundle \Command ;
13
13
14
- use Nelmio \ApiDocBundle \Tests \WebTestCase ;
15
14
use Symfony \Bundle \FrameworkBundle \Console \Application ;
15
+ use Symfony \Bundle \FrameworkBundle \Test \KernelTestCase ;
16
16
use Symfony \Component \Console \Tester \ApplicationTester ;
17
17
18
18
/**
19
19
* @author Amrouche Hamza <[email protected] >
20
20
*/
21
- class SwaggerComandTest extends WebTestCase
21
+ class SwaggerCommandTest extends KernelTestCase
22
22
{
23
23
public function testExecute ()
24
24
{
25
- $ this ->getContainer ();
25
+ self ::bootKernel ();
26
+
26
27
$ application = new Application (static ::$ kernel );
27
28
$ application ->setCatchExceptions (false );
28
29
$ application ->setAutoExit (false );
29
30
$ tester = new ApplicationTester ($ application );
30
- $ input = [
31
- 'command ' => 'api:swagger:export ' ,
32
- ];
31
+ $ input = ['command ' => 'api:swagger:export ' ];
33
32
$ tester ->run ($ input );
34
33
$ display = $ tester ->getDisplay ();
35
34
$ this ->assertJson ($ display );
You can’t perform that action at this time.
0 commit comments