protected function startPass(CompilerPassInterface $pass) { if ($pass instanceof CompilerAwareInterface) { $pass->setCompiler($this); } $this->currentPass = $pass; $this->currentStartTime = microtime(true); }
/** * @expectedException \Oro\Bundle\IntegrationBundle\Exception\LogicException * @expectedExceptionMessage Could not retrieve type attribute for "testId" */ public function testProcessException() { $definition = $this->getMockBuilder('Symfony\\Component\\DependencyInjection\\Definition')->disableOriginalConstructor()->getMock(); /** @var \PHPUnit_Framework_MockObject_MockObject|ContainerBuilder $containerBuilder */ $containerBuilder = $this->getMockBuilder('Symfony\\Component\\DependencyInjection\\ContainerBuilder')->disableOriginalConstructor()->setMethods(['getDefinition', 'findTaggedServiceIds'])->getMock(); $containerBuilder->expects($this->once())->method('getDefinition')->with(ProcessorsPass::SYNC_PROCESSOR_REGISTRY)->will($this->returnValue($definition)); $services = ['testId' => [[]]]; $containerBuilder->expects($this->once())->method('findTaggedServiceIds')->with(ProcessorsPass::SYNC_PROCESSOR_TAG)->will($this->returnValue($services)); $definition->expects($this->never())->method('addMethodCall'); $this->pass->process($containerBuilder); }