$this->assertArrayHasKey('refresh_token', $data);
}
+ public function testCreateTokenWithBadClientId()
+ {
+ $client = $this->getClient();
+ $client->request('POST', '/oauth/v2/token', [
+ 'grant_type' => 'password',
+ 'client_id' => '$WALLABAG_CLIENT_ID',
+ 'client_secret' => 'secret',
+ 'username' => 'admin',
+ 'password' => 'mypassword',
+ ]);
+
+ $this->assertSame(400, $client->getResponse()->getStatusCode());
+ }
+
public function testListingClient()
{
$this->logInAs('admin');
{
$client = $this->getClient();
$em = $client->getContainer()->get('doctrine.orm.entity_manager');
- $userManager = $client->getContainer()->get('fos_user.user_manager');
+ $userManager = $client->getContainer()->get('fos_user.user_manager.test');
$user = $userManager->findUserBy(['username' => $username]);
$apiClient = new Client($user);
$apiClient->setName('My app');