feat: add supervisor role
This commit is contained in:
1 parent
dcd85bb911
commit
3af326251d
22 files changed
+270
-103
No files matched your search
@@ -9,14 +9,18 @@ use PHPUnit\Framework\TestCase;
|
||||
|
||||
class RoleTest extends TestCase
|
||||
{
|
||||
public function testBothEligibleRolesAreRecognised(): void
|
||||
public function testAllEligibleRolesAreRecognised(): void
|
||||
{
|
||||
self::assertSame([Role::EMPLOYEE, Role::ADMIN], Role::eligibleOnly(['ROLE_ADMIN', 'ROLE_EMPLOYEE']));
|
||||
self::assertSame(
|
||||
[Role::EMPLOYEE, Role::SUPERVISOR, Role::ADMIN],
|
||||
Role::eligibleOnly(['ROLE_ADMIN', 'ROLE_SUPERVISOR', 'ROLE_EMPLOYEE']),
|
||||
);
|
||||
}
|
||||
|
||||
public function testEitherRoleOnItsOwnIsEnough(): void
|
||||
public function testEachRoleOnItsOwnIsEnough(): void
|
||||
{
|
||||
self::assertSame([Role::EMPLOYEE], Role::eligibleOnly(['ROLE_EMPLOYEE']));
|
||||
self::assertSame([Role::SUPERVISOR], Role::eligibleOnly(['ROLE_SUPERVISOR']));
|
||||
self::assertSame([Role::ADMIN], Role::eligibleOnly(['ROLE_ADMIN']));
|
||||
}
|
||||
|
||||
@@ -35,6 +39,7 @@ class RoleTest extends TestCase
|
||||
{
|
||||
// myep strips these before exporting, but that is its policy and not our guarantee.
|
||||
self::assertSame([], Role::eligibleOnly(['ROLE_ADMIN_PENDING']));
|
||||
self::assertSame([], Role::eligibleOnly(['ROLE_SUPERVISOR_PENDING']));
|
||||
}
|
||||
|
||||
public function testTheOrderIsStableRegardlessOfWhatMyepSends(): void
|
||||
|
||||
Reference in new issue
Block a user