Example #1
0
 public function testFormatRequestCallsGetAccessToken()
 {
     $this->setCacheExpectations(true, self::MOCK_ACCESS_TOKEN);
     $requester = new Requester($this->mockClientFactory, $this->clientId, $this->clientSecret, $this->mockCache);
     $testArray = $this->setHttpMethodExpectations();
     $response = $requester->formatRequest('GET', 'test-uri');
     $this->assertInstanceOf('Credibility\\DandB\\Response', $response);
     $this->assertTrue($response->isValid());
     $this->assertArrayHasKey('business_name', $response->getResponseData());
     $this->assertArrayHasKey('business_value', $response->getResponseData());
 }