8000 Merge branch '2.0' · symfony/symfony@c534661 · GitHub
[go: up one dir, main page]

Skip to content

Commit c534661

Browse files
committed
Merge branch '2.0'
* 2.0: Fixes incorrect class used in src/Symfony/Bundle/FrameworkBundle/Console/Application.php [FrameworkBundle] added test for fix broken command registration corrected phpdoc
2 parents 48e384b + 89dce2d commit c534661

File tree

3 files changed

+23
-5
lines changed

3 files changed

+23
-5
lines changed

src/Symfony/Bundle/FrameworkBundle/Console/Application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use Symfony\Component\Console\Output\OutputInterface;
1818
use Symfony\Component\HttpKernel\KernelInterface;
1919
use Symfony\Component\HttpKernel\Kernel;
20-
use Symfony\Component\HttpKernel\Bundle;
20+
use Symfony\Component\HttpKernel\Bundle\Bundle;
2121

2222
/**
2323
* Application.

src/Symfony/Bundle/FrameworkBundle/Tests/Console/ApplicationTest.php

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,32 @@ public function testBundleInterfaceImplementation()
2222
{
2323
$bundle = $this->getMock("Symfony\Component\HttpKernel\Bundle\BundleInterface");
2424

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+
{
2544
$kernel = $this->getMock("Symfony\Component\HttpKernel\KernelInterface");
2645
$kernel
2746
->expects($this->any())
2847
->method('getBundles')
29-
->will($this->returnValue(array($bundle)))
48+
->will($this->returnValue($bundles))
3049
;
3150

32-
$application = new Application($kernel);
33-
$application->doRun(new ArrayInput(array('list')), new NullOutput());
51+
return $kernel;
3452
}
3553
}

src/Symfony/Component/DependencyInjection/ContainerBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ public function getAliases()
560560
*
561561
* @param string $id The service identifier
562562
*
563-
* @return Definition A Definition instance
563+
* @return Alias An Alias instance
564564
*
565565
* @throws InvalidArgumentException if the alias does not exist
566566
*

0 commit comments

Comments
 (0)
0