]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
Minor Fix: improve cache test
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>
Thu, 18 Dec 2008 11:29:43 +0000 (11:29 +0000)
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>
Thu, 18 Dec 2008 11:29:43 +0000 (11:29 +0000)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@205 b3834d28-1941-0410-a4f8-b48e95affb8f

tests/tagsCacheTest.php

index f08de05618cf8bf30d3be05f1fc5b5682b0603c1..595afb91f5bc9b0cd6409f0017f9d6e37c5e241b 100644 (file)
@@ -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));