From: Raphaël Barrois Date: Fri, 7 May 2010 10:49:11 +0000 (+0200) Subject: Add UTs for UFC_SchoolId X-Git-Tag: xorg/1.0.0~268 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=f5aea068f7630d75e0fdd62ba6fec4ec805e0a2d;p=platal.git Add UTs for UFC_SchoolId Signed-off-by: Raphaël Barrois --- diff --git a/ut/userfiltertest.php b/ut/userfiltertest.php index 8f0baca..5e18956 100644 --- a/ut/userfiltertest.php +++ b/ut/userfiltertest.php @@ -218,8 +218,24 @@ class UserFilterTest extends PlTestCase */ ); - /* TODO: UFC_SchoolId + /* UFC_SchoolId */ + $tests[] = array( + array(self::buildProfileQuery('WHERE p.xorg_id = {?}', 20060076), + new UFC_SchoolId(UFC_SchoolId::Xorg, 20060076), 1), + array(self::buildProfileQuery('WHERE p.ax_id = {?}', 20060062), + new UFC_SchoolId(UFC_SchoolId::AX, 20060062), 1), + array(self::buildProfileQuery('WHERE p.xorg_id = {?}', 007), + new UFC_SchoolId(UFC_SchoolId::Xorg, 007), 0), + array(self::buildProfileQuery('WHERE p.ax_id = {?}', 007), + new UFC_SchoolId(UFC_SchoolId::AX, 007), 0), + /* FIXME: disabled until we have some examples of school_id + array(self::buildProfileQuery('WHERE p.school_id = {?}', 12345678), + new UFC_SchoolId(UFC_SchoolId::School, 12345678), 1), + array(self::buildProfileQuery('WHERE p.school_id = {?}', 007), + new UFC_SchoolId(UFC_SchoolId::School, 007), 0), + */ + ); /* UFC_EducationSchool */ $id_X = XDB::fetchOneCell('SELECT id