fkooman\OAuth\Client\TokenRequestTest::testAllowArrayScope PHP Method

testAllowArrayScope() public method

public testAllowArrayScope ( )
    public function testAllowArrayScope()
    {
        $client = new Client();
        $mock = new MockPlugin();
        $mock->addResponse(new Response(200, null, $this->tokenResponse[3]));
        $client->addSubscriber($mock);
        $history = new HistoryPlugin();
        $history->setLimit(5);
        $client->addSubscriber($history);
        $guzzle3Client = new Guzzle3Client($client);
        $tokenRequest = new TokenRequest($guzzle3Client, $this->clientConfig[3]);
        $tokenResponse = $tokenRequest->withAuthorizationCode('12345');
        $this->assertTrue($tokenResponse->getScope()->equals(Scope::fromString('foo bar')));
    }