fix tagtest
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@422 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
parent
b4c7b1ad9a
commit
edfefe3eeb
1 changed files with 9 additions and 8 deletions
|
@ -265,9 +265,9 @@ class Tag2TagTest extends TestBase
|
||||||
|
|
||||||
public function testAddLinkedTagsThroughBookmarking()
|
public function testAddLinkedTagsThroughBookmarking()
|
||||||
{
|
{
|
||||||
$bs = $this->bs;
|
$bs = $this->bs;
|
||||||
$tags = array('a>b', 'b>c', 'a>d>e', 'a>a', 'a', 'r=s', 's=t=u');
|
$tags = array('a>b', 'b>c', 'a>d>e', 'a>a', 'a', 'r=s', 's=t=u');
|
||||||
$uid = $this->addUser();
|
$uid = $this->addUser();
|
||||||
$bs->addBookmark(
|
$bs->addBookmark(
|
||||||
"http://google.com", "title", "description", 'note',
|
"http://google.com", "title", "description", 'note',
|
||||||
0, $tags, null, false, false,
|
0, $tags, null, false, false,
|
||||||
|
@ -286,15 +286,16 @@ class Tag2TagTest extends TestBase
|
||||||
$this->assertContains('s', $savedTags);
|
$this->assertContains('s', $savedTags);
|
||||||
|
|
||||||
$tts = $this->tts;
|
$tts = $this->tts;
|
||||||
$linkedTags = $tts->getLinkedTags('a', '>', 1);
|
$linkedTags = $tts->getLinkedTags('a', '>', $uid);
|
||||||
$this->assertEquals(2, sizeof($linkedTags));
|
$this->assertEquals(2, count($linkedTags));
|
||||||
$this->assertSame('b', $linkedTags[0]['tag']);
|
$this->assertSame('b', $linkedTags[0]['tag']);
|
||||||
$this->assertSame('d', $linkedTags[1]['tag']);
|
$this->assertSame('d', $linkedTags[1]['tag']);
|
||||||
$linkedTags = $tts->getLinkedTags('b', '>', 1);
|
|
||||||
$this->assertEquals(1, sizeof($linkedTags));
|
$linkedTags = $tts->getLinkedTags('b', '>', $uid);
|
||||||
|
$this->assertEquals(1, count($linkedTags));
|
||||||
$this->assertSame('c', $linkedTags[0]['tag']);
|
$this->assertSame('c', $linkedTags[0]['tag']);
|
||||||
$this->assertTrue($tts->existsLinkedTags('d', 'e', '>', 1));
|
$this->assertTrue($tts->existsLinkedTags('d', 'e', '>', $uid));
|
||||||
$this->assertFalse($tts->existsLinkedTags('e', 'd', '>', 1));
|
$this->assertFalse($tts->existsLinkedTags('e', 'd', '>', $uid));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSearchThroughLinkedTags()
|
public function testSearchThroughLinkedTags()
|
||||||
|
|
Loading…
Reference in a new issue