unification test was unstable, too

git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@464 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
cweiske 2009-10-28 22:33:36 +00:00
parent 63f82a4101
commit 39db481506
2 changed files with 30 additions and 20 deletions

View file

@ -479,7 +479,8 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
* @param string $sortOrder One of the following values: * @param string $sortOrder One of the following values:
* "date_asc", "date_desc", * "date_asc", "date_desc",
* "title_desc", "title_asc", * "title_desc", "title_asc",
* "url_desc", "url_asc" * "url_desc", "url_asc",
* "voting_asc", "voting_desc"
* @param boolean $watched True if only watched bookmarks * @param boolean $watched True if only watched bookmarks
* shall be returned (FIXME) * shall be returned (FIXME)
* @param integer $startdate Filter for creation date. * @param integer $startdate Filter for creation date.
@ -583,6 +584,12 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
case 'title_asc': case 'title_asc':
$query_5 .= ' ORDER BY B.bTitle ASC '; $query_5 .= ' ORDER BY B.bTitle ASC ';
break; break;
case 'voting_desc':
$query_5 .= ' ORDER BY B.bVoting DESC ';
break;
case 'voting_asc':
$query_5 .= ' ORDER BY B.bVoting ASC ';
break;
case 'url_desc': case 'url_desc':
$query_5 .= ' ORDER BY B.bAddress DESC '; $query_5 .= ' ORDER BY B.bAddress DESC ';
break; break;

View file

@ -103,15 +103,18 @@ class BookmarkTest extends TestBase
{ {
$bs = $this->bs; $bs = $this->bs;
$uid = $this->addUser();
$uid2 = $this->addUser();
$bs->addBookmark( $bs->addBookmark(
'http://site1.com', "title", "description", 'note', 'http://site1.com', "title", "description", 'note',
0, array('tag1'), null, false, false, 0, array('tag1'), null, false, false,
1 $uid
); );
$bs->addBookmark( $bs->addBookmark(
"http://site1.com", "title2", "description2", 'note', "http://site1.com", "title2", "description2", 'note',
0, array('tag2'), null, false, false, 0, array('tag2'), null, false, false,
2 $uid2
); );
$bookmarks = $bs->getBookmarks(); $bookmarks = $bs->getBookmarks();