$query->from("User(id)")->where("User.name LIKE 'z%' || User.name LIKE 's%'");
$sql="SELECT entity.id AS entity__id FROM entity WHERE (entity.name LIKE 'z%' OR entity.name LIKE 's%') AND (entity.type = 0)";
$this->assertEqual($query->getQuery(),$sql);
$query->where("(User.name LIKE 'z%') || (User.name LIKE 's%')");
$this->assertEqual($query->getQuery(),$sql);
$query->where("((User.name LIKE 'z%') || (User.name LIKE 's%'))");
$this->assertEqual($query->getQuery(),$sql);
$query->where("(((User.name LIKE 'z%') || (User.name LIKE 's%')))");
$this->assertEqual($query->getQuery(),$sql);
$query->where("(((User.name LIKE 'z%') || User.name LIKE 's%'))");
$this->assertEqual($query->getQuery(),$sql);
$query->where("(User.name LIKE 'z%') || User.name LIKE 's%' && User.name LIKE 'a%'");
$sql="SELECT entity.id AS entity__id FROM entity WHERE ((entity.name LIKE 'z%' OR entity.name LIKE 's%') AND entity.name LIKE 'a%') AND (entity.type = 0)";
$this->assertEqual($query->getQuery(),$sql);
$query->where("(((User.name LIKE 'z%') || User.name LIKE 's%')) && User.name LIKE 'a%'");
$this->assertEqual($query->getQuery(),$sql);
$query->where("((((User.name LIKE 'z%') || User.name LIKE 's%')) && User.name LIKE 'a%')");
$this->assertEqual($query->getQuery(),$sql);
$query->where("(((((User.name LIKE 'z%') || User.name LIKE 's%')) && User.name LIKE 'a%'))");
$this->assertEqual($query->getQuery(),$sql);
}
publicfunctiontestConditionParser2(){
$query=newDoctrine_Query($this->connection);
$query->from("User(id)")->where("User.name LIKE 'z%' || User.name LIKE 's%'");
$sql="SELECT entity.id AS entity__id FROM entity WHERE (entity.name LIKE 'z%' OR entity.name LIKE 's%') AND (entity.type = 0)";
$this->assertEqual($query->getQuery(),$sql);
$query->where("(User.name LIKE 'z%') OR (User.name LIKE 's%')");
$this->assertEqual($query->getQuery(),$sql);
$query->where("((User.name LIKE 'z%') OR (User.name LIKE 's%'))");
$this->assertEqual($query->getQuery(),$sql);
$query->where("(((User.name LIKE 'z%') OR (User.name LIKE 's%')))");
$this->assertEqual($query->getQuery(),$sql);
$query->where("(((User.name LIKE 'z%') OR User.name LIKE 's%'))");
$this->assertEqual($query->getQuery(),$sql);
$query->where("(User.name LIKE 'z%') OR User.name LIKE 's%' AND User.name LIKE 'a%'");
$sql="SELECT entity.id AS entity__id FROM entity WHERE ((entity.name LIKE 'z%' OR entity.name LIKE 's%') AND entity.name LIKE 'a%') AND (entity.type = 0)";
$this->assertEqual($query->getQuery(),$sql);
$query->where("(((User.name LIKE 'z%') OR User.name LIKE 's%')) AND User.name LIKE 'a%'");
$this->assertEqual($query->getQuery(),$sql);
$query->where("((((User.name LIKE 'z%') OR User.name LIKE 's%')) AND User.name LIKE 'a%')");
$this->assertEqual($query->getQuery(),$sql);
$query->where("(((((User.name LIKE 'z%') OR User.name LIKE 's%')) AND User.name LIKE 'a%'))");