Lib_Test_Partner_MetaDataCheckStatusTest

The Gravity Forms Salesforce Add-On Lib Test Partner MetaDataCheckStatusTest class.

Defined (1)

The class is defined in the following location(s).

/lib/Force.com-Toolkit-for-PHP/unit_test/Lib/Test/Partner/MetaDataCheckStatusTest.php  
  1. class Lib_Test_Partner_MetaDataCheckStatusTest extends Lib_Test_TestAbstractPartner 
  2. public function getTestName() 
  3. return 'MetaDataCheckStatus'; 
  4.  
  5. protected function _run() 
  6. $myMetadataConnection = new SforceMetadataClient($this->_getMetaDataWSDL(), $this->_mylogin, $this->_mySforceConnection); 
  7.  
  8. $customObject = new SforceCustomObject(); 
  9. $customObject->fullName = 'CustomObjFromPHP__c'; 
  10. $customObject->deploymentStatus = DEPLOYMENT_STATUS_DEPLOYED; 
  11.  
  12. $customObject->setDescription("A description"); 
  13. $customObject->setEnableActivities(true); 
  14. $customObject->setEnableDivisions(false); 
  15. $customObject->setEnableHistory(true); 
  16. $customObject->setEnableReports(true); 
  17. $customObject->setHousehold(false); 
  18. $customObject->setLabel("My Custom Obj from PHP"); 
  19. $customField = new SforceCustomField(); 
  20. $customField->setFullName('MyCustomFieldb__c'); 
  21. $customField->setDescription('Description of New Field'); 
  22. $customField->setLabel('My Custom Field Label'); 
  23. $customField->setType('Text'); 
  24.  
  25. $customObject->nameField = $customField; 
  26.  
  27. $customObject->pluralLabel = 'My Custom Objs from PHP'; 
  28. $customObject->sharingModel = SHARING_MODEL_READWRITE; 
  29.  
  30. print "**** Create:\r\n"; 
  31. $createResult = $myMetadataConnection->create($customObject); 
  32. print_r($createResult); 
  33.  
  34. $ids = array($createResult->result->id); 
  35.  
  36. print_r($myMetadataConnection->checkStatus($ids));