eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Configuration\ConfigParserTest::testPrePostMap PHP Method

testPrePostMap() public method

public testPrePostMap ( )
    public function testPrePostMap()
    {
        $parsers = array($this->getMock('eZ\\Bundle\\EzPublishCoreBundle\\DependencyInjection\\Configuration\\ParserInterface'), $this->getMock('eZ\\Bundle\\EzPublishCoreBundle\\DependencyInjection\\Configuration\\ParserInterface'));
        $configParser = new ConfigParser($parsers);
        $config = array('foo' => 'bar', 'some' => 'thing');
        $contextualizer = $this->getMock('eZ\\Bundle\\EzPublishCoreBundle\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerInterface');
        foreach ($parsers as $parser) {
            /* @var \PHPUnit_Framework_MockObject_MockObject $parser */
            $parser->expects($this->once())->method('preMap')->with($config, $contextualizer);
            $parser->expects($this->once())->method('postMap')->with($config, $contextualizer);
        }
        $configParser->preMap($config, $contextualizer);
        $configParser->postMap($config, $contextualizer);
    }