Fix two broken tests
This commit is contained in:
parent
5c8833d5f5
commit
dfaf1d026a
2 changed files with 6 additions and 4 deletions
|
@ -183,7 +183,7 @@ class SemanticScuttle_Service_TagCache extends SemanticScuttle_DbService
|
||||||
$values = $this->_getSynonymValues($tag2, $uId);
|
$values = $this->_getSynonymValues($tag2, $uId);
|
||||||
$this->removeSynonymGroup($tag2, $uId);
|
$this->removeSynonymGroup($tag2, $uId);
|
||||||
foreach($values as $value) {
|
foreach($values as $value) {
|
||||||
$this->addSynonym($tag1, $value['tag'], $uId);
|
$this->addSynonym($tag1, $value, $uId);
|
||||||
}
|
}
|
||||||
$this->addSynonym($tag1, $tag2, $uId);
|
$this->addSynonym($tag1, $tag2, $uId);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -270,12 +270,14 @@ class Tag2TagTest extends TestBase
|
||||||
$tts = $this->tts;
|
$tts = $this->tts;
|
||||||
$linkedTags = $tts->getLinkedTags('a', '>', $uid);
|
$linkedTags = $tts->getLinkedTags('a', '>', $uid);
|
||||||
$this->assertEquals(2, count($linkedTags));
|
$this->assertEquals(2, count($linkedTags));
|
||||||
$this->assertSame('b', $linkedTags[0]['tag']);
|
$this->assertInternalType('string', $linkedTags[0]);
|
||||||
$this->assertSame('d', $linkedTags[1]['tag']);
|
$this->assertSame('b', $linkedTags[0]);
|
||||||
|
$this->assertInternalType('string', $linkedTags[1]);
|
||||||
|
$this->assertSame('d', $linkedTags[1]);
|
||||||
|
|
||||||
$linkedTags = $tts->getLinkedTags('b', '>', $uid);
|
$linkedTags = $tts->getLinkedTags('b', '>', $uid);
|
||||||
$this->assertEquals(1, count($linkedTags));
|
$this->assertEquals(1, count($linkedTags));
|
||||||
$this->assertSame('c', $linkedTags[0]['tag']);
|
$this->assertSame('c', $linkedTags[0]);
|
||||||
$this->assertTrue($tts->existsLinkedTags('d', 'e', '>', $uid));
|
$this->assertTrue($tts->existsLinkedTags('d', 'e', '>', $uid));
|
||||||
$this->assertFalse($tts->existsLinkedTags('e', 'd', '>', $uid));
|
$this->assertFalse($tts->existsLinkedTags('e', 'd', '>', $uid));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue