AuthBucket\Bundle\OAuth2Bundle\Tests\Security\Authentication\Provider\ResourceProviderTest::testNonCompatibileScope PHP Method

testNonCompatibileScope() public method

    public function testNonCompatibileScope()
    {
        $parameters = [];
        $server = ['HTTP_Authorization' => implode(' ', ['Bearer', 'bcc105b66698a64ed23c87b967885289'])];
        $client = $this->createClient();
        $crawler = $client->request('GET', '/api/resource/model', $parameters, [], $server);
        $resourceResponse = json_decode($client->getResponse()->getContent(), true);
        $this->assertSame('invalid_scope', $resourceResponse['error']);
    }