Lib_Test_Partner_AllowFieldTruncationHeaderTest

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

Defined (1)

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

/lib/Force.com-Toolkit-for-PHP/unit_test/Lib/Test/Partner/AllowFieldTruncationHeaderTest.php  
  1. class Lib_Test_Partner_AllowFieldTruncationHeaderTest extends Lib_Test_TestAbstractPartner 
  2. public function getTestName() 
  3. return 'AllowFieldTruncationHeader'; 
  4.  
  5. protected function _run() 
  6. $header = new AllowFieldTruncationHeader(true); 
  7. print_r($header); 
  8. $this->_mySforceConnection->setAllowFieldTruncationHeader($header); 
  9.  
  10. $fields = array ( 
  11. 'FirstName' => 'John',  
  12. 'LastName' => 'Smith',  
  13. 'Phone' => '511111111111111111111111110-555-5555111111111111111111111111111111111111111111111111',  
  14. 'BirthDate' => '1950-01-01' 
  15. ); 
  16.  
  17. $sObject = new SObject(); 
  18. $sObject->fields = $fields; 
  19. $sObject->type = 'Contact'; 
  20.  
  21. $createResponse = $this->_mySforceConnection->create(array($sObject)); 
  22. echo "**** Creating the following:\r\n"; 
  23. print_r($createResponse); 
  24.  
  25. print "**** LastRequestHeaders:\r\n"; 
  26. print_r($this->_mySforceConnection->getLastRequestHeaders()); 
  27. print "**** LastRequest:\r\n"; 
  28. print_r($this->_mySforceConnection->getLastRequest());