diff options
author | cweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2010-02-20 11:08:52 +0000 |
---|---|---|
committer | cweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2010-02-20 11:08:52 +0000 |
commit | 97c3d1ed636609ef19dd3cc268d0f5923f5257db (patch) | |
tree | 1d431dc11ae15cfe6d9a4adce876ee232c91134f /tests/TestBase.php | |
parent | 46b96044fb2375d4b522fa074788199d80b4d243 (diff) | |
download | semanticscuttle-97c3d1ed636609ef19dd3cc268d0f5923f5257db.tar.gz semanticscuttle-97c3d1ed636609ef19dd3cc268d0f5923f5257db.tar.bz2 |
add test for Bookmark2Tag::getTagsForBookmark()
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@663 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'tests/TestBase.php')
-rw-r--r-- | tests/TestBase.php | 10 |
1 files changed, 8 insertions, 2 deletions
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 ); |