eZ\Bundle\EzPublishCoreBundle\Tests\DependencyInjection\Compiler\ChainConfigResolverPassTest::testAddResolver PHP Method

testAddResolver() public method

public testAddResolver ( integer | null $declaredPriority, integer $expectedPriority )
$declaredPriority integer | null
$expectedPriority integer
    public function testAddResolver($declaredPriority, $expectedPriority)
    {
        $resolverDef = new Definition();
        $serviceId = 'some_service_id';
        if ($declaredPriority !== null) {
            $resolverDef->addTag('ezpublish.config.resolver', array('priority' => $declaredPriority));
        } else {
            $resolverDef->addTag('ezpublish.config.resolver');
        }
        $this->setDefinition($serviceId, $resolverDef);
        $this->compile();
        $this->assertContainerBuilderHasServiceDefinitionWithMethodCall('ezpublish.config.resolver.chain', 'addResolver', array(new Reference($serviceId), $expectedPriority));
    }