$this->context =
$this->
getContainer() ->
get(SalesChannelContextFactory::
class) ->
create(Uuid::
randomHex(), TestDefaults::SALES_CHANNEL
);
} /**
* @dataProvider invalidationProvider
*/
public function testInvalidation(IdsCollection
$ids, int
$depth, \Closure
$before, \Closure
$after, int
$calls): void
{ // to improve performance, we generate the required data one time and test different case with same data set
$this->
initData($ids);
$this->
getContainer()->
get('cache.object'
)->
invalidateTags([self::ALL_TAG
]);
$this->
getContainer()->
get('event_dispatcher'
) ->
addListener(NavigationRouteCacheTagsEvent::
class,
static function DNavigationRouteCacheTagsEvent
$event): void
{ $event->
addTags([self::ALL_TAG
]);
});
$route =
$this->
getContainer()->
get(NavigationRoute::
class);
$listener =
$this->
getMockBuilder(CallableClass::
class)->
getMock();