Skip to content

Commit

Permalink
Fixed the last test
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszbieniek committed Aug 10, 2023
1 parent fc20177 commit 0bc8d92
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 2 additions & 3 deletions eZ/Publish/Core/Persistence/Cache/Tests/TrashHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ public function testTrashSubtree()
$versionNo = 1;

$tags = [
'lp-' . $locationId,
'l-' . $locationId,
'c-' . $contentId . '-v-' . $versionNo,
'c-' . $contentId,
'lp-' . $locationId,
'l-' . $locationId,
];

$handlerMethodName = $this->getHandlerMethodName();
Expand Down Expand Up @@ -168,7 +168,6 @@ public function testTrashSubtree()
->method('trashSubtree')
->with($locationId)
->willReturn(null);

$this->cacheIdentifierGeneratorMock
->expects($this->exactly(4))
->method('generateTag')
Expand Down
5 changes: 3 additions & 2 deletions eZ/Publish/Core/Persistence/Cache/TrashHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,15 @@ public function trashSubtree($locationId)
}, $versions);

$tags = array_merge(
$versionTags,
$relationTags,
[
$this->cacheIdentifierGenerator->generateTag(self::CONTENT_IDENTIFIER, [$contentId]),
$this->cacheIdentifierGenerator->generateTag(self::LOCATION_PATH_IDENTIFIER, [$locationId]),
$this->cacheIdentifierGenerator->generateTag(self::LOCATION_IDENTIFIER, [$locationId]),
],
$relationTags,
$versionTags
);

$this->cache->invalidateTags(array_values(array_unique($tags)));

return $return;
Expand Down

0 comments on commit 0bc8d92

Please sign in to comment.