File tree Expand file tree Collapse file tree 3 files changed +23
-5
lines changed
Component/DependencyInjection Expand file tree Collapse file tree 3 files changed +23
-5
lines changed Original file line number Diff line number Diff line change 17
17
use Symfony \Component \Console \Output \OutputInterface ;
18
18
use Symfony \Component \HttpKernel \KernelInterface ;
19
19
use Symfony \Component \HttpKernel \Kernel ;
20
- use Symfony \Component \HttpKernel \Bundle ;
20
+ use Symfony \Component \HttpKernel \Bundle \ Bundle ;
21
21
22
22
/**
23
23
* Application.
Original file line number Diff line number Diff line change @@ -22,14 +22,32 @@ public function testBundleInterfaceImplementation()
22
22
{
23
23
$ bundle = $ this ->getMock ("Symfony\Component\HttpKernel\Bundle\BundleInterface " );
24
24
25
+ $ kernel = $ this ->getKernel (array ($ bundle ));
26
+
27
+ $ application = new Application ($ kernel );
28
+ $ application ->doRun (new ArrayInput (array ('list ' )), new NullOutput ());
29
+ }
30
+
31
+ public function testBundleCommandsAreRegistered ()
32
+ {
33
+ $ bundle = $ this ->getMock ("Symfony\Component\HttpKernel\Bundle\Bundle " );
34
+ $ bundle ->expects ($ this ->once ())->method ('registerCommands ' );
35
+
36
+ $ kernel = $ this ->getKernel (array ($ bundle ));
37
+
38
+ $ application = new Application ($ kernel );
39
+ $ application ->doRun (new ArrayInput (array ('list ' )), new NullOutput ());
40
+ }
41
+
42
+ private function getKernel (array $ bundles )
43
+ {
25
44
$ kernel = $ this ->getMock ("Symfony\Component\HttpKernel\KernelInterface " );
26
45
$ kernel
27
46
->expects ($ this ->any ())
28
47
->method ('getBundles ' )
29
- ->will ($ this ->returnValue (array ( $ bundle ) ))
48
+ ->will ($ this ->returnValue ($ bundles ))
30
49
;
31
50
32
- $ application = new Application ($ kernel );
33
- $ application ->doRun (new ArrayInput (array ('list ' )), new NullOutput ());
51
+ return $ kernel ;
34
52
}
35
53
}
Original file line number Diff line number Diff line change @@ -560,7 +560,7 @@ public function getAliases()
560
560
*
561
561
* @param string $id The service identifier
562
562
*
563
- * @return Definition A Definition instance
563
+ * @return Alias An Alias instance
564
564
*
565
565
* @throws InvalidArgumentException if the alias does not exist
566
566
*
You can’t perform that action at this time.
0 commit comments