Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLuka Trovic <luka@nextcloud.com>2022-10-05 22:06:08 +0300
committerJonas <jonas@nextcloud.com>2022-10-11 10:19:38 +0300
commit476d01e0a5237c9b6c455334668b00b71cb074e9 (patch)
tree0e039173c2c3a5b4774ef0bd8816dec378df93b0 /tests
parent6b43389357a2f45517a27fcd4ec6d06d96594073 (diff)
fix: feedback
Signed-off-by: Luka Trovic <luka@nextcloud.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/Controller/UserApiControllerTest.php19
1 files changed, 10 insertions, 9 deletions
diff --git a/tests/unit/Controller/UserApiControllerTest.php b/tests/unit/Controller/UserApiControllerTest.php
index 3ef2fa32f..96462edc8 100644
--- a/tests/unit/Controller/UserApiControllerTest.php
+++ b/tests/unit/Controller/UserApiControllerTest.php
@@ -57,8 +57,7 @@ class UserApiControllerTest extends TestCase {
/**
* @dataProvider dataTestUsersIndex
*/
- public function testUsersIndex(int $documentId, int $sessionId, string $sessionToken, string $filter)
- {
+ public function testUsersIndex(int $documentId, int $sessionId, string $sessionToken, string $filter) {
$session = new Session();
$session->setUserId('admin');
$this->sessionService
@@ -96,13 +95,15 @@ class UserApiControllerTest extends TestCase {
]
]);
- $users = $this->userApiController->index(
- $documentId,
- $sessionId,
- $sessionToken,
- $filter
- );
- $this->assertInstanceOf(DataResponse::class, $users);
+ $response = $this->userApiController->index(
+ $documentId,
+ $sessionId,
+ $sessionToken,
+ $filter
+ );
+ $this->assertInstanceOf(DataResponse::class, $response);
+ $this->assertIsArray($response->getData());
+ $this->assertSame(['admin' => 'admin'], $response->getData());
}
public function dataTestUsersIndex() {