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