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:
parent
7f2e347217
commit
e5dab0a740
1 changed files with 9 additions and 3 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue