public function testUpdate() { $obj = new Book($this->conn); $obj->id = 1; $obj->name = 'foo'; $obj->description = 'bar'; $this->conn->expects($this->once())->method('update')->with('books', ['id' => 1, 'name' => 'foo', 'description' => 'bar'], ['id' => 1]); $this->assertFalse($obj->isStored()); $obj->update(); $this->assertTrue($obj->isStored()); }