public function testRunPost() { $testArray = $this->setHttpMethodExpectations(); $mockAccessToken = 'test-token'; $response = $this->requester->runPost('test-uri', $testArray, $mockAccessToken); $this->assertInstanceOf('Credibility\\DandB\\Response', $response); $this->assertTrue($response->isValid()); $this->assertArrayHasKey('business_name', $response->getResponseData()); }
/** * Returns new user token based on refresh token from * the User Token call * * @see DandB::userToken * @param $email * @param $refreshToken * @return Response * @throws RequestException|LogicException|ParseException */ public function userTokenRefresh($email, $refreshToken) { return $this->requester->runPost('/v1/user/token/refresh', array('email' => $email, 'refresh_token' => $refreshToken)); }