diff --git a/tests/Symfony/Tests/Component/DependencyInjection/ContainerBuilderTest.php b/tests/Symfony/Tests/Component/DependencyInjection/ContainerBuilderTest.php index e4c2d2619d..13252312d4 100644 --- a/tests/Symfony/Tests/Component/DependencyInjection/ContainerBuilderTest.php +++ b/tests/Symfony/Tests/Component/DependencyInjection/ContainerBuilderTest.php @@ -12,7 +12,7 @@ namespace Symfony\Tests\Component\DependencyInjection; use Symfony\Component\DependencyInjection\Alias; - +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\Definition; @@ -204,6 +204,18 @@ class ContainerBuilderTest extends \PHPUnit_Framework_TestCase $this->assertTrue(isset($aliases['foobar'])); } + /** + * @covers Symfony\Component\DependencyInjection\ContainerBuilder::addCompilerPass + * @covers Symfony\Component\DependencyInjection\ContainerBuilder::getCompilerPassConfig + */ + public function testAddGetCompilerPass() + { + $builder = new ContainerBuilder(); + $builderCompilerPasses = $builder->getCompiler()->getPassConfig()->getPasses(); + $builder->addCompilerPass($this->getMock('Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface')); + $this->assertEquals(sizeof($builderCompilerPasses) + 1, sizeof($builder->getCompiler()->getPassConfig()->getPasses())); + } + /** * @covers Symfony\Component\DependencyInjection\ContainerBuilder::createService */