Пример #1
0
 /**
  * @covers Openbuildings\Kohana\Database_Query_Builder::_compile_conditions
  */
 public function test_where_operands()
 {
     $query = new Database_Query_Builder_Select();
     $this->assertEquals("SELECT * WHERE `table1`.`name` = 'test' AND `table1`.`name` IS NULL AND `table1`.`name` IS NOT NULL AND `table1`.`price` BETWEEN 10 AND 20 AND `table1`.`name` = 'other test'", $query->where('table1.name', '=', 'test')->where('table1.name', '=', NULL)->where('table1.name', '!=', NULL)->where('table1.price', 'BETWEEN', array(10, 20))->where(array('table1.name', 'test_name'), '=', 'other test')->compile());
 }