From 97c3d1ed636609ef19dd3cc268d0f5923f5257db Mon Sep 17 00:00:00 2001 From: cweiske Date: Sat, 20 Feb 2010 11:08:52 +0000 Subject: add test for Bookmark2Tag::getTagsForBookmark() git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@663 b3834d28-1941-0410-a4f8-b48e95affb8f --- tests/TestBase.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'tests/TestBase.php') diff --git a/tests/TestBase.php b/tests/TestBase.php index 277be02..28bda27 100644 --- a/tests/TestBase.php +++ b/tests/TestBase.php @@ -32,17 +32,23 @@ class TestBase extends PHPUnit_Framework_TestCase * @param integer $user User ID the bookmark shall belong * @param string $address Bookmark address to use * @param integer $status Bookmark visibility + * @param array $tags Array of tags to attach. If "null" is given, + * it will automatically be "unittest" * * @return integer ID of bookmark * * @see SemanticScuttle_Service_Bookmark::addBookmark() */ protected function addBookmark( - $user = null, $address = null, $status = 0 + $user = null, $address = null, $status = 0, + $tags = null ) { if ($user === null) { $user = $this->addUser(); } + if ($tags === null) { + $tags = array('unittest'); + } $bs = SemanticScuttle_Service_Factory::get('Bookmark'); $rand = rand(); @@ -57,7 +63,7 @@ class TestBase extends PHPUnit_Framework_TestCase 'description', null, $status, - array('unittest'), + $tags, null, null, false, false, $user ); -- cgit v1.2.3-54-g00ecf