public function testUpdateWithPrimaryKeyChangeNotFromResultSet() { $obj = new Book($this->conn); $obj->name = 'foo'; $obj->id = 3; $obj->id = 4; $obj->id = 5; $this->conn->expects($this->once())->method('update')->with('books', ['id' => 5, 'name' => 'foo'], ['id' => 5]); $obj->update(); }