AuthBucket\Bundle\OAuth2Bundle\Tests\ResponseType\TokenResponseTypeHandlerTest::testExceptionTokenNoClientId PHP Метод

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

    public function testExceptionTokenNoClientId()
    {
        $parameters = ['response_type' => 'token', 'redirect_uri' => 'http://democlient1.com/redirect_uri'];
        $server = ['PHP_AUTH_USER' => 'demousername1', 'PHP_AUTH_PW' => 'demopassword1'];
        $client = $this->createClient();
        $crawler = $client->request('GET', '/api/oauth2/authorize', $parameters, [], $server);
        $this->assertSame(400, $client->getResponse()->getStatusCode());
        $this->assertNotNull(json_decode($client->getResponse()->getContent()));
        $tokenResponse = json_decode($client->getResponse()->getContent(), true);
        $this->assertSame('invalid_request', $tokenResponse['error']);
    }