public function testOnDuplicate()
 {
     $q = new InsertQuery(array('test'), true);
     $q->setValues(array('id' => '35', 'field1' => 'value1', 'field2' => 'value2'));
     $this->assertEquals('INSERT INTO `test` (`id`, `field1`, `field2`) VALUES (:p1, :p2, :p3) ON DUPLICATE KEY UPDATE `id` = LAST_INSERT_ID(`id`), `field1` = VALUES(`field1`), `field2` = VALUES(`field2`)', $q->sql());
     $params = $q->parameters();
     $this->assertEquals('35', $params[':p1']);
     $this->assertEquals('value1', $params[':p2']);
     $this->assertEquals('value2', $params[':p3']);
     $this->assertEquals(3, count($params));
 }