diff options
Diffstat (limited to 'tests/lib/Remote/Api/OCSTest.php')
-rw-r--r-- | tests/lib/Remote/Api/OCSTest.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/lib/Remote/Api/OCSTest.php b/tests/lib/Remote/Api/OCSTest.php index d47bb50cc35..89fd45f0791 100644 --- a/tests/lib/Remote/Api/OCSTest.php +++ b/tests/lib/Remote/Api/OCSTest.php @@ -1,4 +1,5 @@ <?php + /** * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -6,6 +7,7 @@ namespace Test\Remote\Api; +use OC\ForbiddenException; use OC\Memcache\ArrayCache; use OC\Remote\Api\OCS; use OC\Remote\Credentials; @@ -40,7 +42,7 @@ class OCSTest extends TestCase { return 'https://example.com/ocs/v2.php/' . $url; } - public function testGetUser() { + public function testGetUser(): void { $client = $this->getOCSClient(); $this->expectGetRequest($this->getOCSUrl('cloud/users/user'), @@ -52,8 +54,8 @@ class OCSTest extends TestCase { $this->assertEquals('user', $user->getUserId()); } - - public function testGetUserInvalidResponse() { + + public function testGetUserInvalidResponse(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Invalid user response, expected field email not found'); @@ -66,9 +68,9 @@ class OCSTest extends TestCase { $client->getUser('user'); } - - public function testInvalidPassword() { - $this->expectException(\OC\ForbiddenException::class); + + public function testInvalidPassword(): void { + $this->expectException(ForbiddenException::class); $client = $this->getOCSClient(); |