X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FWallabag%2FApiBundle%2FController%2FDeveloperControllerTest.php;h=e9e5ee3b1fc575ba9ceca4476e239c8b983c2a10;hb=8b5bef48d5e5609c0c89a99f34fe56919125fa68;hp=2caeccf5f0fc8bc9275fa79e972c0a4ca7f3e6d2;hpb=71e1cbc8eb5928d393b0772055d6b711e90a09b3;p=github%2Fwallabag%2Fwallabag.git diff --git a/tests/Wallabag/ApiBundle/Controller/DeveloperControllerTest.php b/tests/Wallabag/ApiBundle/Controller/DeveloperControllerTest.php index 2caeccf5..e9e5ee3b 100644 --- a/tests/Wallabag/ApiBundle/Controller/DeveloperControllerTest.php +++ b/tests/Wallabag/ApiBundle/Controller/DeveloperControllerTest.php @@ -34,7 +34,7 @@ class DeveloperControllerTest extends WallabagCoreTestCase $this->assertContains('My app', $alert[0]); } - public function testCreateTokenFromPasswords() + public function testCreateToken() { $client = $this->getClient(); $apiClient = $this->createApiClientForUser('admin'); @@ -56,26 +56,6 @@ class DeveloperControllerTest extends WallabagCoreTestCase $this->assertArrayHasKey('refresh_token', $data); } - public function testCreateTokenFromClientCredentialsOnly() - { - $client = $this->getClient(); - $apiClient = $this->createApiClientForUser('admin', ['client_credentials']); - - $client->request('POST', '/oauth/v2/token', [ - 'grant_type' => 'client_credentials', - 'client_id' => $apiClient->getPublicId(), - 'client_secret' => $apiClient->getSecret(), - ]); - - $this->assertSame(200, $client->getResponse()->getStatusCode()); - - $data = json_decode($client->getResponse()->getContent(), true); - $this->assertArrayHasKey('access_token', $data); - $this->assertArrayHasKey('expires_in', $data); - $this->assertArrayHasKey('token_type', $data); - // Client Credentials created-clients have no refresh tokens - } - public function testListingClient() { $this->logInAs('admin');