summaryrefslogtreecommitdiff
path: root/tests
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
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')
-rw-r--r--tests/LAUNCH_TESTS2
-rw-r--r--tests/bookmarksTest.php4
-rw-r--r--tests/commonDescriptionTest.php6
-rw-r--r--tests/searchTest.php6
-rw-r--r--tests/tag2TagTest.php18
5 files changed, 18 insertions, 18 deletions
diff --git a/tests/LAUNCH_TESTS b/tests/LAUNCH_TESTS
index 52d4ba5..531d239 100644
--- a/tests/LAUNCH_TESTS
+++ b/tests/LAUNCH_TESTS
@@ -4,4 +4,4 @@ Then
To launch the tests, put in a console situated in the root of the SEMANTICSCUTTLE project (where is the SEMANTICSCUTTLE config file):
-phpunit BookmarksTest ./tests/bookmarksTest.php ; phpunit CommonDescriptionTest tests/commonDescriptionTest.php ; phpunit Tag2TagTest tests/tag2TagTest.php ; phpunit SearchTest tests/searchTest.php
+phpunit BookmarksTest ./tests/bookmarksTest.php ; phpunit CommonDescriptionTest tests/commonDescriptionTest.php ; phpunit Tag2TagTest tests/tag2TagTest.php ; phpunit SearchTest tests/searchTest.php ; phpunit TagsTest tests/tagsTest.php
diff --git a/tests/bookmarksTest.php b/tests/bookmarksTest.php
index ac6a79f..9c8e533 100644
--- a/tests/bookmarksTest.php
+++ b/tests/bookmarksTest.php
@@ -22,8 +22,8 @@ class BookmarksTest 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');
diff --git a/tests/commonDescriptionTest.php b/tests/commonDescriptionTest.php
index 4de4d84..c8666c2 100644
--- a/tests/commonDescriptionTest.php
+++ b/tests/commonDescriptionTest.php
@@ -11,7 +11,7 @@ class CommonDescriptionTest extends PHPUnit_Framework_TestCase
{
protected $us;
protected $bs;
- protected $ts;
+ protected $b2ts;
protected $tts;
protected $tsts;
protected $cds;
@@ -24,8 +24,8 @@ class CommonDescriptionTest 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');
diff --git a/tests/searchTest.php b/tests/searchTest.php
index ecdc6ad..2e51717 100644
--- a/tests/searchTest.php
+++ b/tests/searchTest.php
@@ -11,7 +11,7 @@ class SearchTest extends PHPUnit_Framework_TestCase
{
protected $us;
protected $bs;
- protected $ts;
+ protected $b2ts;
protected $tts;
protected $shs;
@@ -23,8 +23,8 @@ class SearchTest 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');
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