public function ContainerBuilderTest::testAddGetCompilerPass

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

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php, line 245

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
    ->assertEquals(sizeof($builderCompilerPasses) + 1, sizeof($builder
    ->getCompiler()
    ->getPassConfig()
    ->getPasses()));
}