Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix timing bug in tests by using title sort order instead of date sor…

…t, fix bug when no user was in db
  • Loading branch information...
commit 25ae541840ea87db649302a0689e2fd896b19a01 1 parent 6959612
@cweiske authored
Showing with 9 additions and 7 deletions.
  1. +9 −7 tests/Tag2TagTest.php
View
16 tests/Tag2TagTest.php
@@ -35,6 +35,8 @@ class Tag2TagTest extends TestBase
protected function setUp()
{
$this->us =SemanticScuttle_Service_Factory::get('User');
+ $this->us->deleteAll();
+ $this->addUser();
$this->bs =SemanticScuttle_Service_Factory::get('Bookmark');
$this->bs->deleteAll();
$this->b2ts =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
@@ -318,20 +320,20 @@ public function testSearchThroughLinkedTags()
$this->assertSame('B1', $results['bookmarks'][0]['bTitle']);
//advanced queries
- $results = $bs->getBookmarks(0, NULL, 1, 'aa');
+ $results = $bs->getBookmarks(0, NULL, 1, 'aa', null, 'title_asc');
$this->assertSame(2, intval($results['total']));
$this->assertSame('B1', $results['bookmarks'][0]['bTitle']);
$this->assertSame('B2', $results['bookmarks'][1]['bTitle']);
- $results = $bs->getBookmarks(0, NULL, 1, 'ee');
+ $results = $bs->getBookmarks(0, NULL, 1, 'ee', null, 'title_asc');
$this->assertSame(2, intval($results['total']));
- $this->assertSame('B2', $results['bookmarks'][1]['bTitle']);
- $this->assertSame('B3', $results['bookmarks'][0]['bTitle']);
+ $this->assertSame('B2', $results['bookmarks'][0]['bTitle']);
+ $this->assertSame('B3', $results['bookmarks'][1]['bTitle']);
- $results = $bs->getBookmarks(0, NULL, 1, 'ii');
+ $results = $bs->getBookmarks(0, NULL, 1, 'ii', null, 'title_asc');
$this->assertSame(2, intval($results['total']));
- $this->assertSame('B2', $results['bookmarks'][1]['bTitle']);
- $this->assertSame('B3', $results['bookmarks'][0]['bTitle']);
+ $this->assertSame('B2', $results['bookmarks'][0]['bTitle']);
+ $this->assertSame('B3', $results['bookmarks'][1]['bTitle']);
$results = $bs->getBookmarks(0, NULL, 1, 'aa+ee');
Please sign in to comment.
Something went wrong with that request. Please try again.