/**
  * @param Authoritarian\Flow\ClientCredentialsFlow $flow
  * @param Guzzle\Http\Message\Request              $request
  */
 public function it_should_request_access_token_when_client_was_not_set($flow, $request)
 {
     $flow->setHttpClient(Argument::type('Guzzle\\Http\\Client'))->shouldBeCalled();
     $flow->setTokenUrl($this->tokenUrl)->shouldBeCalled();
     $flow->getRequest()->willReturn($request);
     $this->requestAccessToken($flow);
 }
 public function it_should_get_the_response_of_the_flow_request()
 {
     $response = new Response(200, null, 'response');
     $this->responses->addResponse($response);
     $this->setHttpClient($this->client);
     $flow = new ClientCredentialsFlow();
     $flow->setClientCredential('username', 'password');
     $this->requestAccessToken($flow)->shouldHaveType('Guzzle\\Http\\Message\\Response');
 }