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));
}