Lib_Test_Partner_ResetPasswordTest

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

Defined (1)

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

/lib/Force.com-Toolkit-for-PHP/unit_test/Lib/Test/Partner/ResetPasswordTest.php  
  1. class Lib_Test_Partner_ResetPasswordTest extends Lib_Test_TestAbstractPartner 
  2. public function getTestName() 
  3. return 'ResetPassword'; 
  4.  
  5. protected function _run() 
  6. // Note: uncomment and run to get userId value.  
  7. /** // Create new user 
  8. $values = array( 
  9. 'Alias' => 'Johny',  
  10. 'Email' => 'test@example.com',  
  11. 'EmailEncodingKey' => 'UTF-8',  
  12. 'LanguageLocaleKey' => 'en_US',  
  13. 'LastName' => 'Smith',  
  14. 'LocaleSidKey' => 'en_US',  
  15. 'ProfileId' => '00et0000000qoV2AAI', // standart user 
  16. 'TimeZoneSidKey' => 'America/Los_Angeles',  
  17. 'Username' => 'johnysmith@example.com',  
  18. 'UserPermissionsCallCenterAutoLogin' => 0,  
  19. 'UserPermissionsMarketingUser' => 0,  
  20. 'UserPermissionsOfflineUser' => 0,  
  21. // 'UserPermissionsWirelessUser' => 0,  
  22. 'CommunityNickname' => 'johnyexamplecom' 
  23. ); 
  24.  
  25. $newUser = new SObject(); 
  26. $newUser->fields = $values; 
  27. $newUser->type = 'User'; 
  28.  
  29. $createResponse = $this->_mySforceConnection->create(array($newUser)); 
  30.  
  31. echo "**** Creating the following:\r\n"; 
  32. print_r($createResponse); 
  33. */ 
  34.  
  35. $new_password=$this->_mySforceConnection->resetPassword('005t0000000uonmAAA'); 
  36. print_r($new_password); 
  37.