class BundleTest in Zircon Profile 8.0
Same name and namespace in other branches
- 8 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\BundleView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BundleTest:: |
public | function | @expectedException \LogicException @expectedExceptionMessage must implement Symfony\Component\DependencyInjection\Extension\ExtensionInterface | |
BundleTest:: |
public | function |