AuthBucket\Bundle\OAuth2Bundle\Tests\Controller\OAuth2ControllerTest::testExceptionNoResponseType PHP Method

testExceptionNoResponseType() public method

    public function testExceptionNoResponseType()
    {
        $parameters = ['client_id' => '1234'];
        $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']);
    }