/** * @expectedException \Lug\Bundle\RegistryBundle\Exception\TagAttributeNotFoundException * @expectedExceptionMessage The attribute "my.alias" could not be found for the tag "my.tag" on the "my.service" service. */ public function testProcessWithMissingResourceAttribute() { $container = $this->createContainerBuilderMock(); $container->expects($this->once())->method('findTaggedServiceIds')->with($this->identicalTo($this->tag))->will($this->returnValue(['my.service' => [[]]])); $container->expects($this->once())->method('getDefinition')->with($this->identicalTo($this->registry))->will($this->returnValue($registry = $this->createDefinitionMock())); $this->compiler->process($container); }