diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/dbal/boolean_processor_test.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/dbal/boolean_processor_test.php b/tests/dbal/boolean_processor_test.php index e615edbdcd..a94085b77d 100644 --- a/tests/dbal/boolean_processor_test.php +++ b/tests/dbal/boolean_processor_test.php @@ -21,6 +21,32 @@ class phpbb_boolean_processor_test extends phpbb_database_test_case return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/boolean_processor.xml'); } + public function test_single_not_in() + { + $db = $this->new_dbal(); + + $db->sql_return_on_error(true); + + $sql_ary = array( + 'SELECT' => 'u.user_id', + 'FROM' => array( + 'phpbb_users' => 'u', + ), + 'WHERE' => array('u.user_id', 'NOT_IN', array(3,4,5)), + 'ORDER_BY' => 'u.user_id', + ); + $sql = $db->sql_build_query('SELECT', $sql_ary); + $result = $db->sql_query($sql); + + $db->sql_return_on_error(false); + + $this->assertEquals(array( + array('user_id' => '1'), + array('user_id' => '2'), + array('user_id' => '6'), + ), $db->sql_fetchrowset($result)); + } + public function test_single_in() { $db = $this->new_dbal(); |