Sets credential object for users
public setCredentialObject ( |
||
$credential | ||
$userId | string | null | User Id associated with the account |
$default | boolean | If set, it would make it as a default credential for all requests |
/** * @after testGetDefaultCredentialObject * * @throws \PayPal\Exception\PayPalInvalidCredentialException */ public function testSetCredentialObjectWithoutDefault() { $authObject = $this->getMockBuilder('\\Paypal\\Auth\\OAuthTokenCredential')->disableOriginalConstructor()->getMock(); $cred = $this->object->setCredentialObject($authObject, null, false)->getCredentialObject(); $this->assertNotNull($cred); $this->assertNotSame($this->object->getCredentialObject(), $authObject); }