1 | <?php |
||
17 | abstract class BaseLimitationIntegrationTest extends BaseTest |
||
18 | { |
||
19 | /** |
||
20 | * @var \eZ\Publish\API\Repository\PermissionResolver |
||
21 | */ |
||
22 | protected $permissionResolver; |
||
23 | |||
24 | public function setUp(): void |
||
29 | |||
30 | /** |
||
31 | * Map Limitations list to readable string for debugging purposes. |
||
32 | * |
||
33 | * @param \eZ\Publish\API\Repository\Values\User\Limitation[] $limitations |
||
34 | * |
||
35 | * @return string |
||
36 | */ |
||
37 | protected function getLimitationsListAsString(array $limitations): string |
||
50 | |||
51 | /** |
||
52 | * Create Editor user with the given Policy and Limitations and set it as current user. |
||
53 | * |
||
54 | * @param string $module |
||
55 | * @param string $function |
||
56 | * @param array $limitations |
||
57 | * |
||
58 | * @throws \eZ\Publish\API\Repository\Exceptions\ForbiddenException |
||
59 | * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException |
||
60 | * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException |
||
61 | */ |
||
62 | protected function loginAsEditorUserWithLimitations(string $module, string $function, array $limitations = []): void |
||
73 | |||
74 | /** |
||
75 | * @param bool $expectedResult |
||
76 | * @param string $module |
||
77 | * @param string $function |
||
78 | * @param array $limitations |
||
79 | * @param \eZ\Publish\API\Repository\Values\ValueObject $object |
||
80 | * @param array $targets |
||
81 | * |
||
82 | * @throws \eZ\Publish\API\Repository\Exceptions\BadStateException |
||
83 | * @throws \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
||
84 | */ |
||
85 | protected function assertCanUser( |
||
104 | } |
||
105 |