It acts as a proxy to inner parsers.
public function testAddSemanticConfig() { $parsers = array($this->getMock('eZ\\Bundle\\EzPublishCoreBundle\\DependencyInjection\\Configuration\\ParserInterface'), $this->getMock('eZ\\Bundle\\EzPublishCoreBundle\\DependencyInjection\\Configuration\\ParserInterface')); $configParser = new ConfigParser($parsers); $nodeBuilder = new NodeBuilder(); foreach ($parsers as $parser) { /** @var \PHPUnit_Framework_MockObject_MockObject $parser */ $parser->expects($this->once())->method('addSemanticConfig')->with($nodeBuilder); } $configParser->addSemanticConfig($nodeBuilder); }