getConfigHashmap(); $token = $cred->getAccessToken($config); $this->assertNotNull($token); // Check that we get the same token when issuing a new call before token expiry $newToken = $cred->getAccessToken($config); $this->assertNotNull($newToken); $this->assertEquals($token, $newToken); } /** * @group integration */ public function testInvalidCredentials() { $this->setExpectedException('PayPal\Exception\PPConnectionException'); $cred = new OAuthTokenCredential('dummy', 'secret'); $this->assertNull($cred->getAccessToken(PPConfigManager::getInstance()->getConfigHashmap())); } }