Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authordiosmosis <diosmosis@users.noreply.github.com>2020-11-19 11:20:29 +0300
committerGitHub <noreply@github.com>2020-11-19 11:20:29 +0300
commit0679149fdff4853ba90055414f69ac3e8d32900a (patch)
tree5181cf057905a7cd55fef4105d125b3f5fb419c6 /tests
parent40ce0672484f6799e11da61d1d0b04bd4213d4fb (diff)
handle "all" in removeInvalidationsFromDistributedList (#16752)
Diffstat (limited to 'tests')
-rw-r--r--tests/PHPUnit/Integration/DataAccess/ArchiveInvalidatorTest.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/PHPUnit/Integration/DataAccess/ArchiveInvalidatorTest.php b/tests/PHPUnit/Integration/DataAccess/ArchiveInvalidatorTest.php
index be8ceb4f77..7f52f1aa71 100644
--- a/tests/PHPUnit/Integration/DataAccess/ArchiveInvalidatorTest.php
+++ b/tests/PHPUnit/Integration/DataAccess/ArchiveInvalidatorTest.php
@@ -121,6 +121,21 @@ class ArchiveInvalidatorTest extends IntegrationTestCase
$this->assertEquals($expected, $items);
}
+ public function test_removeInvalidationsFromDistributedList_removesAllSiteEntries()
+ {
+ $this->invalidator->scheduleReArchiving([1, 2, 3], 'ExamplePlugin');
+ $this->invalidator->scheduleReArchiving([1, 4, 5], 'ExamplePlugin');
+ $this->invalidator->scheduleReArchiving('all', 'ExamplePlugin');
+
+ $this->invalidator->removeInvalidationsFromDistributedList('all', 'ExamplePlugin');
+
+ $list = new ReArchiveList();
+ $items = $list->getAll();
+
+ $expected = [];
+ $this->assertEquals($expected, $items);
+ }
+
public function test_removeInvalidations_removesAll_ifAllSitesSpecified()
{
$this->insertInvalidations([