Minor Fix: improve cache test
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@205 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
parent
4d122aa3fc
commit
1917aeaab2
1 changed files with 4 additions and 0 deletions
|
@ -163,6 +163,10 @@ class TagsCacheTest extends PHPUnit_Framework_TestCase
|
||||||
$this->assertEquals(array('b', 'c', 'd', 'e'), $tts->getAllLinkedTags('a', '>', 1));
|
$this->assertEquals(array('b', 'c', 'd', 'e'), $tts->getAllLinkedTags('a', '>', 1));
|
||||||
$this->assertEquals(array('d', 'e'), $tts->getAllLinkedTags('c', '>', 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
|
//cache must be deleted for user when links are modified
|
||||||
$tts->addLinkedTags('a', 'f', '=', 1);
|
$tts->addLinkedTags('a', 'f', '=', 1);
|
||||||
$this->assertEquals(array(), $tcs->getChildren('a', 1));
|
$this->assertEquals(array(), $tcs->getChildren('a', 1));
|
||||||
|
|
Loading…
Reference in a new issue