aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-11-02 09:36:44 +0000
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-11-02 09:36:44 +0000
commit77f21adb83f22d16afc654a89a8ef9a0b000fdfb (patch)
treecec755f1f2d2e6eb87710d2f3feb4aa84cfe655b /scripts
parent73212d6e3fadc53e988164e03c8e3f2def1c45c6 (diff)
downloadsemanticscuttle-77f21adb83f22d16afc654a89a8ef9a0b000fdfb.tar.gz
semanticscuttle-77f21adb83f22d16afc654a89a8ef9a0b000fdfb.tar.bz2
add bookmark creation test script
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@496 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'scripts')
-rw-r--r--scripts/create-testbookmarks.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/scripts/create-testbookmarks.php b/scripts/create-testbookmarks.php
new file mode 100644
index 0000000..b0d2756
--- /dev/null
+++ b/scripts/create-testbookmarks.php
@@ -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
+ );
+}
+?> \ No newline at end of file