summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/tagsCacheTest.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/tagsCacheTest.php b/tests/tagsCacheTest.php
index f08de05..595afb9 100644
--- a/tests/tagsCacheTest.php
+++ b/tests/tagsCacheTest.php
@@ -163,6 +163,10 @@ class TagsCacheTest extends PHPUnit_Framework_TestCase
$this->assertEquals(array('b', 'c', 'd', 'e'), $tts->getAllLinkedTags('a', '>', 1));
$this->assertEquals(array('d', 'e'), $tts->getAllLinkedTags('c', '>', 1));
+ // check that result comes from cache (artificial changes in cache must appear in result)
+ $tcs->removeChild('a', 'e', 1);
+ $this->assertEquals(array('b', 'c', 'd'), $tts->getAllLinkedTags('a', '>', 1));
+
//cache must be deleted for user when links are modified
$tts->addLinkedTags('a', 'f', '=', 1);
$this->assertEquals(array(), $tcs->getChildren('a', 1));