fkooman\OAuth\Client\TokenRequestTest::testAllowStringExpiresIn PHP Метод

testAllowStringExpiresIn() публичный Метод

    public function testAllowStringExpiresIn()
    {
        $client = new Client();
        $mock = new MockPlugin();
        $mock->addResponse(new Response(200, null, $this->tokenResponse[2]));
        $client->addSubscriber($mock);
        $history = new HistoryPlugin();
        $history->setLimit(5);
        $client->addSubscriber($history);
        $guzzle3Client = new Guzzle3Client($client);
        $tokenRequest = new TokenRequest($guzzle3Client, $this->clientConfig[2]);
        $tokenResponse = $tokenRequest->withAuthorizationCode('12345');
        $this->assertEquals(1200, $tokenResponse->getExpiresIn());
    }