diff options
author | Simon Holywell <[email protected]> | 2013-01-21 17:30:38 +0000 |
---|---|---|
committer | Simon Holywell <[email protected]> | 2013-01-21 17:30:38 +0000 |
commit | 6391acb3371e07742cf94c7c4bc4cc3888a6cae5 (patch) | |
tree | 085fa1607f7f2921ef6c5225cb0de2759eadcea9 /test/test_queries.php | |
parent | a1d8a1c68465c78be34fe3a9afb817c990028715 (diff) |
Add more query building tests
Diffstat (limited to 'test/test_queries.php')
-rwxr-xr-x | test/test_queries.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/test_queries.php b/test/test_queries.php index db78ffe..14adf9b 100755 --- a/test/test_queries.php +++ b/test/test_queries.php @@ -148,7 +148,6 @@ $expected = "SELECT * FROM `widget` GROUP BY `name` HAVING `age` < '10' AND `age` > '5'"; Tester::check_equal("HAVING less than and greater than", $expected); - /////////////////////////////////////////// ORM::for_table('widget')->group_by('name')->having_lte('age', 10)->having_gte('age', 5)->find_many(); $expected = "SELECT * FROM `widget` GROUP BY `name` HAVING `age` <= '10' AND `age` >= '5'"; @@ -178,6 +177,8 @@ $expected = "SELECT * FROM `widget` WHERE `age` <= '10' AND `age` >= '5'"; Tester::check_equal("Less than or equal and greater than or equal", $expected); + /////////////////////////////////////////// + ORM::for_table('widget')->where_null('name')->find_many(); $expected = "SELECT * FROM `widget` WHERE `name` IS NULL"; Tester::check_equal("where_null method", $expected); |