public function testUpdateLOCALog() { $bmapper = new LOCALogMapper(self::$pdo); $loca = getLOCALogInstance(); $bmapper->insert($loca); // phpは、オブジェクトを参照渡しするので、insert後のLOCALogオブジェクトをチェックすればよい $this->assertArrayHasKey('loca_id', $loca->toArray()); $loca->name = 'updateLOCALog'; $bmapper->update($loca); // DBに保存されているかどうかを調べる $loca = $bmapper->find($loca->loca_id); $this->assertSame('updateLOCALog', $loca->name); }