From a3da9c538c60d91ae3ff00f67d91acc3c8d67df7 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Tue, 30 Nov 2021 14:22:15 +0100 Subject: [PATCH] tests: Fix argument type. --- .../Authorization/AuthorizationHelperTest.php | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Tests/Security/Authorization/AuthorizationHelperTest.php b/src/Bundle/ChillMainBundle/Tests/Security/Authorization/AuthorizationHelperTest.php index ea960bb8c..0046b5a74 100644 --- a/src/Bundle/ChillMainBundle/Tests/Security/Authorization/AuthorizationHelperTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Security/Authorization/AuthorizationHelperTest.php @@ -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 );