コード例 #1
0
 public function testDelete()
 {
     $thing = new Thing();
     $thing->name = 'sean';
     $thing->save();
     $id = $thing->getId();
     $thing->delete();
     $this->assertEquals(null, $thing->getId());
     $t = new Thing($id);
     $exc = null;
     try {
         $t->retrieve();
     } catch (Exception $e) {
         $exc = $e;
         $this->assertTrue(is_a($e, 'Pfw_Exception_NotFound'));
     }
     $this->assertNotEquals(null, $exc);
 }