Ejemplo n.º 1
0
 public function testItGetSqlReplacingThePlaceHolders()
 {
     $this->object->from('table')->where(array('size > :min', 'size < :max', 'count != :min', 'name = :name'));
     $params = array('min' => 10, 'max' => 20, 'name' => 'foo');
     $sql = 'SELECT * FROM table WHERE size > 10 AND size < 20 AND count != 10 AND name = "foo"';
     $this->assertEquals($sql, $this->object->toSql($params));
 }