Lib_Test_Partner_PackageVersionHeaderTest

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

Defined (1)

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

/lib/Force.com-Toolkit-for-PHP/unit_test/Lib/Test/Partner/PackageVersionHeaderTest.php  
  1. class Lib_Test_Partner_PackageVersionHeaderTest extends Lib_Test_TestAbstractPartner 
  2. public function getTestName() 
  3. return 'PackageVersionHeader'; 
  4.  
  5. protected function _run() 
  6. $pv = new stdClass(); 
  7. $pv->majorNumber = 2; 
  8. $pv->minorNumber = 1; 
  9. $pv->namespace = SforcePartnerClient::PARTNER_NAMESPACE; 
  10. $header = new PackageVersionHeader( 
  11. array($pv) 
  12. ); 
  13. print_r($header); 
  14. $this->_mySforceConnection->setPackageVersionHeader($header); 
  15.  
  16. $fields = array ( 
  17. 'FirstName' => 'John',  
  18. 'LastName' => 'Smith',  
  19. 'Phone' => '510-555-5555',  
  20. 'BirthDate' => '1950-01-01' 
  21. ); 
  22.  
  23. $sObject = new SObject(); 
  24. $sObject->fields = $fields; 
  25. $sObject->type = 'Contact'; 
  26.  
  27. $createResponse = $this->_mySforceConnection->create(array($sObject)); 
  28. echo "**** Creating the following:\r\n"; 
  29. print_r($createResponse); 
  30.  
  31. print "**** LastRequestHeaders:\r\n"; 
  32. print_r($this->_mySforceConnection->getLastRequestHeaders()); 
  33. print "**** LastRequest:\r\n"; 
  34. print_r($this->_mySforceConnection->getLastRequest());