You are here

public function BundleTest::testRegisterCommands in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-kernel/Tests/Bundle/BundleTest.php \Symfony\Component\HttpKernel\Tests\Bundle\BundleTest::testRegisterCommands()

File

vendor/symfony/http-kernel/Tests/Bundle/BundleTest.php, line 21

Class

BundleTest

Namespace

Symfony\Component\HttpKernel\Tests\Bundle

Code

public function testRegisterCommands() {
  $cmd = new FooCommand();
  $app = $this
    ->getMock('Symfony\\Component\\Console\\Application');
  $app
    ->expects($this
    ->once())
    ->method('add')
    ->with($this
    ->equalTo($cmd));
  $bundle = new ExtensionPresentBundle();
  $bundle
    ->registerCommands($app);
  $bundle2 = new ExtensionAbsentBundle();
  $this
    ->assertNull($bundle2
    ->registerCommands($app));
}