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:
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() {