Lib_Test_Partner_LoginScopeHeaderTest

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

Defined (1)

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

/lib/Force.com-Toolkit-for-PHP/unit_test/Lib/Test/Partner/LoginScopeHeaderTest.php  
  1. class Lib_Test_Partner_LoginScopeHeaderTest extends Lib_Test_TestAbstractPartner 
  2. public function getTestName() 
  3. return 'LoginScopeHeader'; 
  4.  
  5. /** 
  6. * Note: Enable CustomerPortal in developer admin area 
  7. */ 
  8. protected function _run() 
  9. echo "***** Get User Info*****\n"; 
  10. $response = $this->_mySforceConnection->getUserInfo(); 
  11. print_r($response); 
  12.  
  13. $this->_mySforceConnection->logout(); 
  14.  
  15. $this->_mySforceConnection = new SforcePartnerClient(); 
  16. $this->_mySforceConnection->createConnection($this->getWSDL()); 
  17.  
  18. // this value should be taken from salesforce developer site. 
  19.  
  20. // $header = new LoginScopeHeader($response->organizationId, $this->_portalId); 
  21. $header = new LoginScopeHeader(NULL, $this->_portalId); 
  22.  
  23. $this->_mySforceConnection->setLoginScopeHeader($header); 
  24. $mylogin = $this->_mySforceConnection->login($this->_userName, $this->_password); 
  25. print_r($mylogin); 
  26. print_r($this->_mySforceConnection->getServerTimestamp());