public function testUpdate() { $where = 'username="******"'; $pass = $this->db->selectValue("SELECT password FROM test_users WHERE {$where}"); $rows = $this->db->update('test_users', array('password' => $pass . '1'), $where); $this->assertEquals(1, $rows); $rows = $this->db->update('test_users', array('password' => $pass), $where); $this->assertEquals(1, $rows); }
/** * @expectedException \Vtk13\LibSql\SqlException * @expectedExceptionMessage You have an error in your SQL syntax; */ public function testMisspelledUpdate() { $this->db->update('S E', array(), 'q'); }