Ejemplo n.º 1
0
 function test_default()
 {
     $query = new SQL_Query('table');
     $query->addWhere('1', '<>', '2');
     $query->resetWhere();
     $this->assertEquals(null, $query->getWhere());
 }
Ejemplo n.º 2
0
 function test_twoParams()
 {
     $query = new SQL_Query('table');
     $query->addWhere(2, '=', 2);
     // test this ...
     $query->addWhere(new SQL_Condition(1, '=', 1), 'OR');
     $cond = new SQL_Condition(2, '=', 2);
     $cond->add(new SQL_Condition(1, '=', 1), 'OR');
     $this->assertEquals($cond, $query->getWhere());
 }