allow adding of certain addresses

git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@654 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
cweiske 2010-02-16 21:54:31 +00:00
parent 7f2e347217
commit e5dab0a740

View file

@ -30,10 +30,11 @@ class TestBase extends PHPUnit_Framework_TestCase
* Create a new bookmark. * 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 * @return integer ID of bookmark
*/ */
protected function addBookmark($user = null) protected function addBookmark($user = null, $address = null)
{ {
if ($user === null) { if ($user === null) {
$user = $this->addUser(); $user = $this->addUser();
@ -41,8 +42,13 @@ class TestBase extends PHPUnit_Framework_TestCase
$bs = SemanticScuttle_Service_Factory::get('Bookmark'); $bs = SemanticScuttle_Service_Factory::get('Bookmark');
$rand = rand(); $rand = rand();
if ($address === null) {
$address = 'http://example.org/' . $rand;
}
$bid = $bs->addBookmark( $bid = $bs->addBookmark(
'http://example.org/' . $rand, $address,
'unittest bookmark #' . $rand, 'unittest bookmark #' . $rand,
'description', 'description',
null, null,