Пример #1
0
 function it_should_not_call_refresh_method_if_there_is_no_token(ClientInterface $mockedClient, RequestInterface $failedRequest, SessionInterface $mockedSession, ResponseInterface $mockedResponse)
 {
     $mockedClient->send($failedRequest)->willThrow('\\Omniphx\\Forrest\\Exceptions\\TokenExpiredException');
     $mockedClient->createRequest(Argument::any(), Argument::any(), Argument::any())->willReturn($failedRequest);
     $mockedSession->getRefreshToken()->willThrow('\\Omniphx\\Forrest\\Exceptions\\MissingRefreshTokenException');
     $this->shouldThrow('Omniphx\\Forrest\\Exceptions\\MissingRefreshTokenException')->duringRequest('url', ['key' => 'value']);
 }