tests: Fix argument type.

This commit is contained in:
Pol Dellaiera 2021-11-30 14:22:15 +01:00
parent 5a2d297c2e
commit a3da9c538c
No known key found for this signature in database
GPG Key ID: D476DFE9C67467CA

View File

@ -77,7 +77,7 @@ final class AuthorizationHelperTest extends KernelTestCase
true,
in_array($centerA, $ah->getReachableCenters(
$userA,
new Role('CHILL_ROLE_1'),
'CHILL_ROLE_1',
null
), true),
'center A should be available for userA, with role 1 ',
@ -86,7 +86,7 @@ final class AuthorizationHelperTest extends KernelTestCase
true,
in_array($centerA, $ah->getReachableCenters(
$userA,
new Role('CHILL_ROLE_2'),
'CHILL_ROLE_2',
null
), true),
'center A should be available for userA, with role 2 ',
@ -95,7 +95,7 @@ final class AuthorizationHelperTest extends KernelTestCase
true,
in_array($centerB, $ah->getReachableCenters(
$userA,
new Role('CHILL_ROLE_2'),
'CHILL_ROLE_2',
null
), true),
'center A should be available for userA, with role 2 ',
@ -104,7 +104,7 @@ final class AuthorizationHelperTest extends KernelTestCase
false,
in_array($centerB, $ah->getReachableCenters(
$userA,
new Role('CHILL_ROLE_1'),
'CHILL_ROLE_1',
null
), true),
'center B should NOT be available for userA, with role 1 ',
@ -114,7 +114,7 @@ final class AuthorizationHelperTest extends KernelTestCase
true,
in_array($centerA, $ah->getReachableCenters(
$userA,
new Role('CHILL_ROLE_1'),
'CHILL_ROLE_1',
$scopeB
), true),
'center A should be available for userA, with role 1, scopeC ',
@ -123,7 +123,7 @@ final class AuthorizationHelperTest extends KernelTestCase
false,
in_array($centerA, $ah->getReachableCenters(
$userA,
new Role('CHILL_ROLE_2'),
'CHILL_ROLE_2',
$scopeC
), true),
'center A should NOT be available for userA, with role 2, scopeA ',
@ -132,7 +132,7 @@ final class AuthorizationHelperTest extends KernelTestCase
true,
in_array($centerB, $ah->getReachableCenters(
$userA,
new Role('CHILL_ROLE_2'),
'CHILL_ROLE_2',
$scopeA
), true),
'center B should be available for userA, with role 2, scopeA ',
@ -171,7 +171,7 @@ final class AuthorizationHelperTest extends KernelTestCase
true,
$scopeA,
$userA,
new Role('CHILL_ROLE_2'),
'CHILL_ROLE_2',
$centerA,
'Assert that a scope is found within accessible scopes',
],
@ -179,7 +179,7 @@ final class AuthorizationHelperTest extends KernelTestCase
false,
$scopeB,
$userA,
new Role('CHILL_ROLE_2'),
'CHILL_ROLE_2',
$centerA,
'Assert that a scope not reachable is NOT found within accessible scopes',
],
@ -187,7 +187,7 @@ final class AuthorizationHelperTest extends KernelTestCase
false,
$scopeB,
$userA,
new Role('CHILL_ROLE_1'),
'CHILL_ROLE_1',
$centerB,
'Assert that a scope not reachable is not found within accessible scopes.'
. ' Trying on filter centering',
@ -204,7 +204,7 @@ final class AuthorizationHelperTest extends KernelTestCase
$users = $this->getAuthorizationHelper()
->findUsersReaching(
new Role('CHILL_PERSON_SEE'),
'CHILL_PERSON_SEE',
$centerA
);