From e5dab0a740e71384031caadecb9f9e283572e8f2 Mon Sep 17 00:00:00 2001 From: cweiske Date: Tue, 16 Feb 2010 21:54:31 +0000 Subject: allow adding of certain addresses git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@654 b3834d28-1941-0410-a4f8-b48e95affb8f --- tests/TestBase.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'tests') 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, -- cgit v1.2.3