コード例 #1
0
 public function testsaveAndDelete()
 {
     error_reporting(E_ERROR | E_PARSE);
     $aosContracts = new AOS_Contracts();
     $aosContracts->name = 'test';
     $aosContracts->save();
     //test for record ID to verify that record is saved
     $this->assertTrue(isset($aosContracts->id));
     $this->assertEquals(36, strlen($aosContracts->id));
     //mark the record as deleted and verify that this record cannot be retrieved anymore.
     $aosContracts->mark_deleted($aosContracts->id);
     $result = $aosContracts->retrieve($aosContracts->id);
     $this->assertEquals(null, $result);
 }