Permalink
Browse files

Fix two broken tests

  • Loading branch information...
1 parent 5c8833d commit dfaf1d026accae515b9d7cb8593a6f157884fe07 @cweiske committed Mar 21, 2013
Showing with 6 additions and 4 deletions.
  1. +1 −1 src/SemanticScuttle/Service/TagCache.php
  2. +5 −3 tests/Tag2TagTest.php
@@ -183,7 +183,7 @@ function addSynonym($tag1, $tag2, $uId) {
$values = $this->_getSynonymValues($tag2, $uId);
$this->removeSynonymGroup($tag2, $uId);
foreach($values as $value) {
- $this->addSynonym($tag1, $value['tag'], $uId);
+ $this->addSynonym($tag1, $value, $uId);
}
$this->addSynonym($tag1, $tag2, $uId);
break;
@@ -270,12 +270,14 @@ public function testAddLinkedTagsThroughBookmarking()
$tts = $this->tts;
$linkedTags = $tts->getLinkedTags('a', '>', $uid);
$this->assertEquals(2, count($linkedTags));
- $this->assertSame('b', $linkedTags[0]['tag']);
- $this->assertSame('d', $linkedTags[1]['tag']);
+ $this->assertInternalType('string', $linkedTags[0]);
+ $this->assertSame('b', $linkedTags[0]);
+ $this->assertInternalType('string', $linkedTags[1]);
+ $this->assertSame('d', $linkedTags[1]);
$linkedTags = $tts->getLinkedTags('b', '>', $uid);
$this->assertEquals(1, count($linkedTags));
- $this->assertSame('c', $linkedTags[0]['tag']);
+ $this->assertSame('c', $linkedTags[0]);
$this->assertTrue($tts->existsLinkedTags('d', 'e', '>', $uid));
$this->assertFalse($tts->existsLinkedTags('e', 'd', '>', $uid));
}

0 comments on commit dfaf1d0

Please sign in to comment.