From f5aea068f7630d75e0fdd62ba6fec4ec805e0a2d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Barrois?= Date: Fri, 7 May 2010 12:49:11 +0200 Subject: [PATCH] Add UTs for UFC_SchoolId MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Barrois --- ut/userfiltertest.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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 -- 2.1.4