getCredentialObject() public method

Obtain Credential Object based on UserId provided.
public getCredentialObject ( null $userId = null ) : OAuthTokenCredential
$userId null
return PayPal\Auth\OAuthTokenCredential
 /**
  * @test
  */
 public function testGetRestCredentialObject()
 {
     $cred = $this->object->getCredentialObject('acct1');
     $this->assertNotNull($cred);
     $this->assertAttributeEquals($this->config['acct1.ClientId'], 'clientId', $cred);
     $this->assertAttributeEquals($this->config['acct1.ClientSecret'], 'clientSecret', $cred);
 }