X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=ut%2Fuserfiltertest.php;h=dcf3f3e2130f81061b1ace7a452dc7e820b998fd;hb=9a13e83f4b39c7feaba924b724fd43497109481b;hp=dd608fcdd213d90208e64d0ff4a26dc1073d35e3;hpb=6c1e97aebf287289e754d156d741d0246eb38d8c;p=platal.git diff --git a/ut/userfiltertest.php b/ut/userfiltertest.php index dd608fc..dcf3f3e 100644 --- a/ut/userfiltertest.php +++ b/ut/userfiltertest.php @@ -1,6 +1,6 @@ {?}', '2008-01-01'), @@ -462,7 +459,7 @@ class UserFilterTest extends PlTestCase /* UFC_Registered */ - $tests[] = array( + $tests['register'] = array( array(self::buildAccountQuery('WHERE a.uid IS NOT NULL AND a.state = \'active\''), new UFC_Registered(true), -1), array(self::buildAccountQuery('WHERE a.uid IS NOT NULL AND a.state != \'pending\''), @@ -482,8 +479,10 @@ class UserFilterTest extends PlTestCase ); $testcases = array(); - foreach ($tests as $t) { - $testcases = array_merge($testcases, $t); + foreach ($tests as $name => $t) { + foreach ($t as $id => $case) { + $testcases[$name . '-' . $id] = $case; + } } return $testcases; } @@ -592,6 +591,18 @@ class UserFilterTest extends PlTestCase array(self::buildProfileQuery('WHERE p.deathdate IS NOT NULL ORDER BY p.deathdate DESC, p.pid'), array(new UFO_Death(true), new UFO_Pid()), new UFC_Dead()), + array(self::buildProfileQuery('ORDER BY p.next_birthday, p.pid'), + array(new UFO_Birthday(), new UFO_Pid())), + array(self::buildProfileQuery('ORDER BY p.next_birthday DESC, p.pid'), + array(new UFO_Birthday(true), new UFO_Pid())), + array(self::buildProfileQuery('ORDER BY p.last_change, p.pid'), + array(new UFO_ProfileUpdate(), new UFO_Pid())), + array(self::buildProfileQuery('ORDER BY p.last_change DESC, p.pid'), + array(new UFO_ProfileUpdate(true), new UFO_Pid())), + array(self::buildAccountQuery('ORDER BY a.registration_date, a.uid'), + array(new UFO_Registration(), new UFO_Uid())), + array(self::buildAccountQuery('ORDER BY a.registration_date DESC, a.uid'), + array(new UFO_Registration(true), new UFO_Uid())), ); }