/** * @test */ public function testGetRestCredentialObject() { $cred = $this->object->getCredentialObject('acct3'); $this->assertNotNull($cred); $this->assertArrayHasKey('clientId', $cred); $this->assertEquals($this->config['acct3.ClientId'], $cred['clientId']); $this->assertArrayHasKey('clientSecret', $cred); $this->assertEquals($this->config['acct3.ClientSecret'], $cred['clientSecret']); }
/** * @test */ public function testGetCredentialObject() { $IPPCredential = $this->object->getCredentialObject('jb-us-seller_api1.paypal.com'); $this->assertNotNull($IPPCredential); $IPPCredential = $this->object->getCredentialObject('suarumugam-biz_api1.paypal.com'); $this->assertNotNull($IPPCredential); $this->assertEquals('suarumugam-biz_api1.paypal.com', $IPPCredential->getUsername()); $this->assertEquals('config/cert_key.pem', $IPPCredential->getCertificatePath()); $IPPCredential = $this->object->getCredentialObject('suarumugam-biz_api1.paypal.com'); $this->assertNotNull($IPPCredential->getUserName()); $IPPCredential = $this->object->getCredentialObject(); $this->assertEquals('jb-us-seller_api1.paypal.com', $IPPCredential->getUsername()); $this->setExpectedException('PPInvalidCredentialException'); $IPPCredential = $this->object->getCredentialObject('invalid_biz_api1.gmail.com'); }
/** * @test */ public function testGetPlatformCredentialObject() { $cred = $this->object->getCredentialObject(); $this->assertEquals('APP-80W284485P519543T', $cred->getApplicationId()); }