aboutsummaryrefslogtreecommitdiff
path: root/scripts/create-testbookmarks.php
blob: b0d2756d8ed50fab6940caef26ada1e73ca497a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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
    );
}
?>