diff options
author | cweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2010-02-16 21:54:31 +0000 |
---|---|---|
committer | cweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2010-02-16 21:54:31 +0000 |
commit | e5dab0a740e71384031caadecb9f9e283572e8f2 (patch) | |
tree | c7da9c1d297ea4f2e09ef1081a55177b7b7c3fc5 /tests/TestBase.php | |
parent | 7f2e3472174354bd3f23875bdbe23914f89269dd (diff) | |
download | semanticscuttle-e5dab0a740e71384031caadecb9f9e283572e8f2.tar.gz semanticscuttle-e5dab0a740e71384031caadecb9f9e283572e8f2.tar.bz2 |
allow adding of certain addresses
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@654 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'tests/TestBase.php')
-rw-r--r-- | tests/TestBase.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/TestBase.php b/tests/TestBase.php index 05988a5..f23f678 100644 --- a/tests/TestBase.php +++ b/tests/TestBase.php @@ -29,11 +29,12 @@ class TestBase extends PHPUnit_Framework_TestCase /** * Create a new bookmark. * - * @param integer $user User ID the bookmark shall belong + * @param integer $user User ID the bookmark shall belong + * @param string $address Bookmark address to use * * @return integer ID of bookmark */ - protected function addBookmark($user = null) + protected function addBookmark($user = null, $address = null) { if ($user === null) { $user = $this->addUser(); @@ -41,8 +42,13 @@ class TestBase extends PHPUnit_Framework_TestCase $bs = SemanticScuttle_Service_Factory::get('Bookmark'); $rand = rand(); + + if ($address === null) { + $address = 'http://example.org/' . $rand; + } + $bid = $bs->addBookmark( - 'http://example.org/' . $rand, + $address, 'unittest bookmark #' . $rand, 'description', null, |