From 4de56ed6623c57c1c767be192ffe2af5926fe598 Mon Sep 17 00:00:00 2001 From: mensonge Date: Mon, 21 Apr 2008 08:44:44 +0000 Subject: Refactoring: rename sc_tags into sc_bookmarks2tags (and services, codes...) git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@116 b3834d28-1941-0410-a4f8-b48e95affb8f --- tests/tag2TagTest.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'tests/tag2TagTest.php') diff --git a/tests/tag2TagTest.php b/tests/tag2TagTest.php index 70925bd..3f686a4 100644 --- a/tests/tag2TagTest.php +++ b/tests/tag2TagTest.php @@ -11,7 +11,7 @@ class Tag2TagTest extends PHPUnit_Framework_TestCase { protected $us; protected $bs; - protected $ts; + protected $b2ts; protected $tts; protected function setUp() @@ -22,8 +22,8 @@ class Tag2TagTest extends PHPUnit_Framework_TestCase $this->us =& ServiceFactory::getServiceInstance('UserService'); $this->bs =& ServiceFactory::getServiceInstance('BookmarkService'); $this->bs->deleteAll(); - $this->ts =& ServiceFactory::getServiceInstance('TagService'); - $this->ts->deleteAll(); + $this->b2ts =& ServiceFactory::getServiceInstance('Bookmark2TagService'); + $this->b2ts->deleteAll(); $this->tts =& ServiceFactory::getServiceInstance('Tag2TagService'); $this->tts->deleteAll(); $this->tsts =& ServiceFactory::getServiceInstance('TagStatService'); @@ -237,8 +237,8 @@ class Tag2TagTest extends PHPUnit_Framework_TestCase $bs->addBookmark("http://google.com", "title", "description", "status", $tags, null, false, false, 1); $bookmark = $bs->getBookmarkByAddress("http://google.com"); - $ts = $this->ts; - $savedTags = $ts->getTagsForBookmark(intval($bookmark['bId'])); + $b2ts = $this->b2ts; + $savedTags = $b2ts->getTagsForBookmark(intval($bookmark['bId'])); $this->assertEquals(6, sizeof($savedTags)); $this->assertContains('b', $savedTags); $this->assertContains('c', $savedTags); @@ -425,7 +425,7 @@ class Tag2TagTest extends PHPUnit_Framework_TestCase public function testRenameFunction() { $tts = $this->tts; - $ts = $this->ts; + $b2ts = $this->b2ts; $bs = $this->bs; $tsts = $this->tsts; @@ -436,10 +436,10 @@ class Tag2TagTest extends PHPUnit_Framework_TestCase $bookmarks =& $bs->getBookmarks(0, 1, NULL, NULL, NULL, getSortOrder(), NULL, 0, $dtend); $this->assertEquals(1, $bookmarks['total']); - $ts->renameTag(1, 'tag1', 'newtag1'); - $tags1 = $ts->getTagsForBookmark(1); + $b2ts->renameTag(1, 'tag1', 'newtag1'); + $tags1 = $b2ts->getTagsForBookmark(1); $this->assertSame(array('newtag1', 'tag11', 'tag111'), $tags1); - $tags1 = $ts->getTagsForBookmark(2); + $tags1 = $b2ts->getTagsForBookmark(2); $this->assertSame(array('tag2', 'tag22', 'tag222'), $tags1); //should not be changed -- cgit v1.2.3