aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2013-03-21 17:57:48 +0100
committerChristian Weiske <cweiske@cweiske.de>2013-03-21 17:57:48 +0100
commitdfaf1d026accae515b9d7cb8593a6f157884fe07 (patch)
tree2c386469c6a775cbcf498d9081ef2938a2ab0295
parent5c8833d5f50086e7a2362166f878c947697e4221 (diff)
downloadsemanticscuttle-dfaf1d026accae515b9d7cb8593a6f157884fe07.tar.gz
semanticscuttle-dfaf1d026accae515b9d7cb8593a6f157884fe07.tar.bz2
Fix two broken tests
-rw-r--r--src/SemanticScuttle/Service/TagCache.php2
-rw-r--r--tests/Tag2TagTest.php8
2 files changed, 6 insertions, 4 deletions
diff --git a/src/SemanticScuttle/Service/TagCache.php b/src/SemanticScuttle/Service/TagCache.php
index 64ec0cc..f8a28af 100644
--- a/src/SemanticScuttle/Service/TagCache.php
+++ b/src/SemanticScuttle/Service/TagCache.php
@@ -183,7 +183,7 @@ class SemanticScuttle_Service_TagCache extends SemanticScuttle_DbService
$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;
diff --git a/tests/Tag2TagTest.php b/tests/Tag2TagTest.php
index 58556f1..d7dd8b7 100644
--- a/tests/Tag2TagTest.php
+++ b/tests/Tag2TagTest.php
@@ -270,12 +270,14 @@ class Tag2TagTest extends TestBase
$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));
}