public function testExceptionNoGrantType()
{
$parameters = ['code' => 'f0c68d250bcc729eb780a235371a9a55', 'redirect_uri' => 'http://democlient2.com/redirect_uri'];
$server = ['PHP_AUTH_USER' => 'http://democlient2.com/', 'PHP_AUTH_PW' => 'demosecret2'];
$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']);
}