$container =
new Container();
$container->
set('cache.invalidator_cache_bin',
$invalidator_cache_bin);
$container->
set('cache.non_invalidator_cache_bin',
$non_invalidator_cache_bin);
$container->
setParameter('cache_bins',
['cache.invalidator_cache_bin' => 'invalidator_cache_bin', 'cache.non_invalidator_cache_bin' => 'non_invalidator_cache_bin'
]);
$cache_tags_invalidator->
setContainer($container);
$invalidator =
$this->
createMock('\Drupal\Core\Cache\CacheTagsInvalidator'
);
$invalidator->
expects($this->
once()) ->
method('invalidateTags'
) ->
with(['node:1'
]);
$cache_tags_invalidator->
addInvalidator($invalidator);
$cache_tags_invalidator->
invalidateTags(['node:1'
]);
}}