$container =
$this->
createContainerFromFile('cache'
);
$this->
assertTrue($container->
hasDefinition('console.command.cache_pool_invalidate_tags'
));
$locator =
$container->
getDefinition('console.command.cache_pool_invalidate_tags'
)->
getArgument(0
);
$this->
assertInstanceOf(ServiceLocatorArgument::
class,
$locator);
$iterator =
$locator->
getTaggedIteratorArgument();
$this->
assertInstanceOf(TaggedIteratorArgument::
class,
$iterator);
$this->
assertSame('cache.taggable',
$iterator->
getTag());
$this->
assertSame('pool',
$iterator->
getIndexAttribute());
$this->
assertTrue($iterator->
needsIndexes());
} public function testRemovesResourceCheckerConfigCacheFactoryArgumentOnlyIfNoDebug() { $container =
$this->
createContainer(['kernel.debug' => true
]);
(new FrameworkExtension())->
load([['annotations' => false, 'http_method_override' => false, 'handle_all_throwables' => true, 'php_errors' =>
['log' => true
]]],
$container);
$this->
assertCount(1,
$container->
getDefinition('config_cache_factory'
)->
getArguments());
$container =
$this->
createContainer(['kernel.debug' => false
]);
(new FrameworkExtension())->
load([['annotations' => false, 'http_method_override' => false, 'handle_all_throwables' => true, 'php_errors' =>
['log' => true
]]],
$container);
$this->
assertEmpty($container->
getDefinition('config_cache_factory'
)->
getArguments());
}