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

testAllowCommaSeparatedScope() public method

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