]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
Fix two broken tests
authorChristian Weiske <cweiske@cweiske.de>
Thu, 21 Mar 2013 16:57:48 +0000 (17:57 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Thu, 21 Mar 2013 16:57:48 +0000 (17:57 +0100)
src/SemanticScuttle/Service/TagCache.php
tests/Tag2TagTest.php

index 64ec0cc2d40fb3bf58ef99e17023584d0d56dd0b..f8a28affdf3e52089dcdf5b1d7214bffac34c879 100644 (file)
@@ -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;
index 58556f1ff308b1756aa1e43ee4c38b7384c2d1b4..d7dd8b7bb116aabd73d46ebe36546a0b8aa48ad3 100644 (file)
@@ -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));
     }