public function testGetSqlReplacingThePlaceHolders() { $this->object->table('table')->set(array('name' => ':name', 'age' => ':age')); $sql = 'UPDATE table SET name = "foo", age = 12'; $params = array('name' => 'foo', 'age' => 12); $this->assertEquals($sql, $this->object->toSql($params)); }
/** * Factory Update Builder * * @param string $table the table to update * @return Update */ public static function update($table = null) { $query = new Update(); if ($table) { $query->table($table); } return $query; }