예제 #1
0
 public function testWhereAnd()
 {
     $condition = "`field1` > 2";
     $this->object->where($condition);
     $this->object->andWhere("`field2` > 3");
     $result = $this->object->orWhere("`field3` > 4")->getDbComponent()->getWherePart();
     $compare = " WHERE (`field1` > 2) AND (`field2` > 3) OR (`field3` > 4)";
     $this->assertEquals($compare, $result);
 }
예제 #2
0
 public function testWhereAnd()
 {
     $condition = "field1 > 2";
     $this->object->where($condition);
     $this->object->andWhere("field2 > 3");
     $result = $this->object->orWhere("field3 > 4")->getWherePart();
     $compare = " WHERE (field1 > 2) AND (field2 > 3) OR (field3 > 4)";
     $this->assertEquals($compare, $result);
 }