add bookmark creation test script
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@496 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
parent
73212d6e3f
commit
77f21adb83
1 changed files with 27 additions and 0 deletions
27
scripts/create-testbookmarks.php
Normal file
27
scripts/create-testbookmarks.php
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
/**
|
||||
* Simply create some test bookmarks
|
||||
*/
|
||||
$_SERVER['HTTP_HOST'] = 'http://localhost/';
|
||||
define('UNIT_TEST_MODE', true);
|
||||
|
||||
require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
|
||||
|
||||
$us = SemanticScuttle_Service_Factory::get('User');
|
||||
$uid = $us->addUser('dummy', 'dummy', 'dummy@example.org');
|
||||
|
||||
$bs = SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
for ($nA = 0; $nA < 10; $nA++) {
|
||||
$rand = rand();
|
||||
$bid = $bs->addBookmark(
|
||||
'http://example.org/' . $rand,
|
||||
'unittest bookmark #' . $rand,
|
||||
'description',
|
||||
null,
|
||||
0,
|
||||
array('unittest'),
|
||||
null, false, false,
|
||||
$uid
|
||||
);
|
||||
}
|
||||
?>
|
Loading…
Reference in a new issue