aboutsummaryrefslogtreecommitdiff
path: root/tests/tag2TagTest.php
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-04-21 08:44:44 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-04-21 08:44:44 +0000
commit4de56ed6623c57c1c767be192ffe2af5926fe598 (patch)
treef1ad8e46567874cbdaefdcf873cf9dee4af32355 /tests/tag2TagTest.php
parent81478ceba0c1bbdaa43679b72ec6d4fd603f5d17 (diff)
downloadsemanticscuttle-4de56ed6623c57c1c767be192ffe2af5926fe598.tar.gz
semanticscuttle-4de56ed6623c57c1c767be192ffe2af5926fe598.tar.bz2
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
Diffstat (limited to 'tests/tag2TagTest.php')
-rw-r--r--tests/tag2TagTest.php18
1 files changed, 9 insertions, 9 deletions
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