Skip to content

Commit 96f515a

Browse files
fix: feedback
Signed-off-by: Luka Trovic <luka@nextcloud.com>
1 parent 4dd0851 commit 96f515a

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

tests/unit/Controller/UserApiControllerTest.php

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ protected function setUp(): void {
5757
/**
5858
* @dataProvider dataTestUsersIndex
5959
*/
60-
public function testUsersIndex(int $documentId, int $sessionId, string $sessionToken, string $filter)
61-
{
60+
public function testUsersIndex(int $documentId, int $sessionId, string $sessionToken, string $filter) {
6261
$session = new Session();
6362
$session->setUserId('admin');
6463
$this->sessionService
@@ -96,13 +95,15 @@ public function testUsersIndex(int $documentId, int $sessionId, string $sessionT
9695
]
9796
]);
9897

99-
$users = $this->userApiController->index(
100-
$documentId,
101-
$sessionId,
102-
$sessionToken,
103-
$filter
104-
);
105-
$this->assertInstanceOf(DataResponse::class, $users);
98+
$response = $this->userApiController->index(
99+
$documentId,
100+
$sessionId,
101+
$sessionToken,
102+
$filter
103+
);
104+
$this->assertInstanceOf(DataResponse::class, $response);
105+
$this->assertIsArray($response->getData());
106+
$this->assertSame(['admin' => 'admin'], $response->getData());
106107
}
107108

108109
public function dataTestUsersIndex() {

0 commit comments

Comments
 (0)