You are here

public function ContainerBuilderTest::testAddGetCompilerPass in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/dependency-injection/Tests/ContainerBuilderTest.php \Symfony\Component\DependencyInjection\Tests\ContainerBuilderTest::testAddGetCompilerPass()

@covers Symfony\Component\DependencyInjection\ContainerBuilder::addCompilerPass @covers Symfony\Component\DependencyInjection\ContainerBuilder::getCompilerPassConfig

File

vendor/symfony/dependency-injection/Tests/ContainerBuilderTest.php, line 264

Class

ContainerBuilderTest

Namespace

Symfony\Component\DependencyInjection\Tests

Code

public function testAddGetCompilerPass() {
  $builder = new ContainerBuilder();
  $builder
    ->setResourceTracking(false);
  $builderCompilerPasses = $builder
    ->getCompiler()
    ->getPassConfig()
    ->getPasses();
  $builder
    ->addCompilerPass($this
    ->getMock('Symfony\\Component\\DependencyInjection\\Compiler\\CompilerPassInterface'));
  $this
    ->assertCount(count($builder
    ->getCompiler()
    ->getPassConfig()
    ->getPasses()) - 1, $builderCompilerPasses);
}