$this->cacheInvalidatorMock =
$this->
createMock(CacheInvalidator::
class);
$this->cacheInvalidationSubscriber =
new CacheInvalidationSubscriber( $this->cacheInvalidatorMock,
$this->
getContainer()->
get(Connection::
class),
false,
false
);
} public function testItInvalidatesCacheIfPropertyGroupIsChanged(): void
{ $this->
insertDefaultPropertyGroup();
$groupRepository =
$this->
getContainer()->
get('property_group.repository'
);
$event =
$groupRepository->
update([ [ 'id' =>
$this->ids->
get('group1'
),
'sortingType' => PropertyGroupDefinition::SORTING_TYPE_POSITION,
],
], Context::
createDefaultContext());
$this->cacheInvalidatorMock->
expects(static::
once()) ->
method('invalidate'
)