diff --git a/src/Tags/Traits/HasTags.php b/src/Tags/Traits/HasTags.php index 93f0bb9d..76361818 100644 --- a/src/Tags/Traits/HasTags.php +++ b/src/Tags/Traits/HasTags.php @@ -154,6 +154,7 @@ public function removeAllTags() $db->setQuery($query); $db->execute(); + TagSearch::clearStaticCache(); } /** diff --git a/tests/tests/Tags/Traits/HasTagsTest.php b/tests/tests/Tags/Traits/HasTagsTest.php index 90c06012..8dceffd2 100644 --- a/tests/tests/Tags/Traits/HasTagsTest.php +++ b/tests/tests/Tags/Traits/HasTagsTest.php @@ -11,6 +11,7 @@ use Joomla\CMS\Factory; use Phproberto\Joomla\Entity\Tags\Tag; use Phproberto\Joomla\Entity\Collection; +use Phproberto\Joomla\Entity\Tags\Search\TagSearch; use Phproberto\Joomla\Entity\Tests\Tags\Traits\Stubs\ClassWithTags; use Phproberto\Joomla\Entity\Tests\Tags\Traits\Stubs\ClassWithSearchableTags; @@ -206,6 +207,7 @@ public function searchTagsReturnsExpectedTags() protected function tearDown() { ClassWithTags::clearAll(); + TagSearch::clearStaticCache(); parent::tearDown(); }