コード例 #1
0
 public function testCreateReminderAndCreateLinkAndDeleteCall()
 {
     $call = new call();
     $aosContracts = new AOS_Contracts();
     $aosContracts->name = 'test';
     //test createReminder()
     $aosContracts->createReminder();
     //verify record ID to check that record is saved
     $this->assertTrue(isset($aosContracts->call_id));
     $this->assertEquals(36, strlen($aosContracts->call_id));
     //verify the parent_type value set by createReminder()
     $call->retrieve($aosContracts->call_id);
     $this->assertAttributeEquals('AOS_Contracts', 'parent_type', $call);
     //test createLink() and verify the parent_type value
     $aosContracts->createLink();
     $call->retrieve($aosContracts->call_id);
     $this->assertAttributeEquals('Accounts', 'parent_type', $call);
     //delete the call and verify that this record cannot be retrieved anymore.
     $aosContracts->deleteCall();
     $call->retrieve($aosContracts->call_id);
     $this->assertEquals(null, $result);
 }