AuthBucket\Bundle\OAuth2Bundle\Tests\Controller\OAuth2ControllerTest::testExceptionAuthCodeBothClientId PHP Метод

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

    public function testExceptionAuthCodeBothClientId()
    {
        $parameters = ['grant_type' => 'authorization_code', 'client_id' => 'http://democlient1.com/', 'client_secret' => 'demosecret1'];
        $server = ['PHP_AUTH_USER' => 'http://democlient1.com/', 'PHP_AUTH_PW' => 'demosecret1'];
        $client = $this->createClient();
        $crawler = $client->request('POST', '/api/oauth2/token', $parameters, [], $server);
        $this->assertNotNull(json_decode($client->getResponse()->getContent()));
        $tokenResponse = json_decode($client->getResponse()->getContent(), true);
        $this->assertSame('invalid_request', $tokenResponse['error']);
    }