You are here

class BundleTest in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/Tests/Bundle/BundleTest.php \Symfony\Component\HttpKernel\Tests\Bundle\BundleTest

Hierarchy

  • class \Symfony\Component\HttpKernel\Tests\Bundle\BundleTest extends \Symfony\Component\HttpKernel\Tests\Bundle\PHPUnit_Framework_TestCase

Expanded class hierarchy of BundleTest

File

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

Namespace

Symfony\Component\HttpKernel\Tests\Bundle
View source
class BundleTest extends \PHPUnit_Framework_TestCase {
  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));
  }

  /**
   * @expectedException \LogicException
   * @expectedExceptionMessage must implement Symfony\Component\DependencyInjection\Extension\ExtensionInterface
   */
  public function testGetContainerExtensionWithInvalidClass() {
    $bundle = new ExtensionNotValidBundle();
    $bundle
      ->getContainerExtension();
  }

}

Members