public testExceptionAuthCodeBadPostClientId ( ) |
public function testExceptionAuthCodeBadPostClientId()
{
$parameters = ['grant_type' => 'authorization_code', 'client_id' => 'http://badclient1.com/', 'client_secret' => 'badsecret1'];
$server = [];
$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_client', $tokenResponse['error']);
}