diff options
author | Joas Schilling <coding@schilljs.com> | 2020-11-06 14:12:40 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-11-10 15:34:35 +0100 |
commit | 39131519b2f425e50f929eedb6fe81c5991ed1b9 (patch) | |
tree | e5297f1da47e771e1dba7739521dba89b8a00d7a /apps/oauth2 | |
parent | 61c767128c49b8aa8bd681e8ac7edaa235812c5a (diff) | |
download | nextcloud-server-39131519b2f425e50f929eedb6fe81c5991ed1b9.tar.gz nextcloud-server-39131519b2f425e50f929eedb6fe81c5991ed1b9.zip |
Make the test pass on repeating calls
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/oauth2')
-rw-r--r-- | apps/oauth2/tests/Db/ClientMapperTest.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/oauth2/tests/Db/ClientMapperTest.php b/apps/oauth2/tests/Db/ClientMapperTest.php index ad1612da6b4..e4a71fc1040 100644 --- a/apps/oauth2/tests/Db/ClientMapperTest.php +++ b/apps/oauth2/tests/Db/ClientMapperTest.php @@ -40,6 +40,13 @@ class ClientMapperTest extends TestCase { $this->clientMapper = new ClientMapper(\OC::$server->getDatabaseConnection()); } + protected function tearDown(): void { + $query = \OC::$server->getDatabaseConnection()->getQueryBuilder(); + $query->delete('oauth2_clients')->execute(); + + parent::tearDown(); + } + public function testGetByIdentifier() { $client = new Client(); $client->setClientIdentifier('MyAwesomeClientIdentifier'); @@ -51,7 +58,6 @@ class ClientMapperTest extends TestCase { $this->assertEquals($client, $this->clientMapper->getByIdentifier('MyAwesomeClientIdentifier')); } - public function testGetByIdentifierNotExisting() { $this->expectException(\OCA\OAuth2\Exceptions\ClientNotFoundException::class); @@ -69,7 +75,6 @@ class ClientMapperTest extends TestCase { $this->assertEquals($client, $this->clientMapper->getByUid($client->getId())); } - public function testGetByUidNotExisting() { $this->expectException(\OCA\OAuth2\Exceptions\ClientNotFoundException::class); |