diff options
author | Christian Weiske <cweiske@cweiske.de> | 2013-03-21 18:23:34 +0100 |
---|---|---|
committer | Christian Weiske <cweiske@cweiske.de> | 2013-03-21 18:23:34 +0100 |
commit | 25ae541840ea87db649302a0689e2fd896b19a01 (patch) | |
tree | 435ea300623b98d39e55261cc3aeb82d6e1c0e88 /tests | |
parent | 69596125d7a9c086abdf4677d9cda12e91e51c61 (diff) | |
download | semanticscuttle-25ae541840ea87db649302a0689e2fd896b19a01.tar.gz semanticscuttle-25ae541840ea87db649302a0689e2fd896b19a01.tar.bz2 |
fix timing bug in tests by using title sort order instead of date sort, fix bug when no user was in db
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Tag2TagTest.php | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/Tag2TagTest.php b/tests/Tag2TagTest.php index d7dd8b7..89da483 100644 --- a/tests/Tag2TagTest.php +++ b/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 @@ class Tag2TagTest extends TestBase $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'); |