Skip to content

Commit

Permalink
[Tests] Fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
ciastektk committed Nov 27, 2024
1 parent 9428b5a commit 57c7735
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions tests/integration/REST/GetUsersWithPermissionInfoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public function testGetUsersWithPermissionsEndpoint(
}

$fixedResponse = $this->doReplaceResponse($content);

self::assertSame($expectedResponse, $fixedResponse);
}

Expand All @@ -88,7 +89,7 @@ public function provideDataForTestGetUsersWithPermissionsEndpoint(): iterable
self::MODULE_CONTENT,
self::FUNCTION_READ,
['contentId' => 41],
'{"access":[{"id":"__FIXED_ID__","name":"John Doe","email":"[email protected]"},{"id":"__FIXED_ID__","name":"Josh Bar","email":"[email protected]"}],"no_access":[{"id":"__FIXED_ID__","name":"Guest Guest","email":"[email protected]"}]}',
'{"access":[{"id":"__FIXED_ID__","name":"Administrator User","email":"[email protected]"},{"id":"__FIXED_ID__","name":"John Doe","email":"[email protected]"},{"id":"__FIXED_ID__","name":"Josh Bar","email":"[email protected]"}],"no_access":[{"id":"__FIXED_ID__","name":"Anonymous User","email":"[email protected]"},{"id":"__FIXED_ID__","name":"Guest Guest","email":"[email protected]"}]}',
];

yield 'Check content-read for content item 41 and location 51' => [
Expand All @@ -99,18 +100,7 @@ public function provideDataForTestGetUsersWithPermissionsEndpoint(): iterable
'contentId' => 41,
'locationId' => 51,
],
'{"access":[{"id":"__FIXED_ID__","name":"John Doe","email":"[email protected]"},{"id":"__FIXED_ID__","name":"Josh Bar","email":"[email protected]"}],"no_access":[{"id":"__FIXED_ID__","name":"Guest Guest","email":"[email protected]"}]}',
];

yield 'Check content-read for content item 41 and phrase=adm' => [
self::MEDIA_CONTENT_ITEM_ID,
self::MODULE_CONTENT,
self::FUNCTION_READ,
[
'contentId' => 41,
'phrase' => 'Adm*',
],
'{"access":[],"no_access":[]}',
'{"access":[{"id":"__FIXED_ID__","name":"Administrator User","email":"[email protected]"},{"id":"__FIXED_ID__","name":"John Doe","email":"[email protected]"},{"id":"__FIXED_ID__","name":"Josh Bar","email":"[email protected]"}],"no_access":[{"id":"__FIXED_ID__","name":"Anonymous User","email":"[email protected]"},{"id":"__FIXED_ID__","name":"Guest Guest","email":"[email protected]"}]}',
];

yield 'Check content-read for phrase=undef*' => [
Expand Down

0 comments on commit 57c7735

Please sign in to comment.