- // use miscellaneous cases
- $this->assertEquals(
- 2,
- sizeof(self::$publicLinkDB->filterFullText('userfriendly -'))
- );
- $this->assertEquals(
- 2,
- sizeof(self::$publicLinkDB->filterFullText('UserFriendly -'))
- );
- $this->assertEquals(
- 2,
- sizeof(self::$publicLinkDB->filterFullText('uSeRFrIendlY -'))
- );
-
- // use miscellaneous case and offset
- $this->assertEquals(
- 2,
- sizeof(self::$publicLinkDB->filterFullText('RFrIendL'))
- );
+ self::$privateLinkDB->reorder('ASC');
+ $linkIds = array(42, 4, 9, 1, 0, 7, 6, 8, 41);
+ $cpt = 0;
+ foreach (self::$privateLinkDB as $key => $value) {
+ $this->assertEquals($linkIds[$cpt++], $key);
+ }
+ self::$privateLinkDB->reorder('DESC');
+ $linkIds = array_reverse($linkIds);
+ $cpt = 0;
+ foreach (self::$privateLinkDB as $key => $value) {
+ $this->assertEquals($linkIds[$cpt++], $key);
+ }