diff options
Diffstat (limited to 'test/test_queries.php')
-rw-r--r-- | test/test_queries.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_queries.php b/test/test_queries.php index 6bd22b9..aadfe46 100644 --- a/test/test_queries.php +++ b/test/test_queries.php @@ -42,6 +42,14 @@ $expected = 'SELECT * FROM `widget` WHERE `name` NOT LIKE "%Fred%"'; Tester::check_equal("where_not_like method", $expected); + ORM::for_table('widget')->where_in('name', array('Fred', 'Joe'))->find_many(); + $expected = 'SELECT * FROM `widget` WHERE `name` IN ("Fred", "Joe")'; + Tester::check_equal("where_in method", $expected); + + ORM::for_table('widget')->where_not_in('name', array('Fred', 'Joe'))->find_many(); + $expected = 'SELECT * FROM `widget` WHERE `name` NOT IN ("Fred", "Joe")'; + Tester::check_equal("where_not_in method", $expected); + ORM::for_table('widget')->limit(5)->find_one(); $expected = 'SELECT * FROM `widget` LIMIT 5'; Tester::check_equal("LIMIT clause", $expected); |