mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-03 21:34:59 +00:00
Remove usage of deprecated Role class
This commit is contained in:
@@ -354,14 +354,14 @@ final class ActivityControllerTest extends WebTestCase
|
||||
->get('chill.main.security.authorization.helper')
|
||||
->getReachableScopes(
|
||||
$user,
|
||||
new Role('CHILL_ACTIVITY_UPDATE'),
|
||||
'CHILL_ACTIVITY_UPDATE',
|
||||
$center
|
||||
);
|
||||
$reachableScopesDelete = self::$kernel->getContainer()
|
||||
->get('chill.main.security.authorization.helper')
|
||||
->getReachableScopes(
|
||||
$user,
|
||||
new Role('CHILL_ACTIVITY_DELETE'),
|
||||
'CHILL_ACTIVITY_DELETE',
|
||||
$center
|
||||
);
|
||||
$reachableScopesId = array_intersect(
|
||||
|
@@ -30,11 +30,6 @@ final class ActivityTypeTest extends KernelTestCase
|
||||
*/
|
||||
protected $center;
|
||||
|
||||
/**
|
||||
* @var \Symfony\Component\DependencyInjection\ContainerInterface
|
||||
*/
|
||||
protected $container;
|
||||
|
||||
/**
|
||||
* @var \Symfony\Component\Form\FormBuilderInterface
|
||||
*/
|
||||
@@ -85,7 +80,7 @@ final class ActivityTypeTest extends KernelTestCase
|
||||
$form = $this->formBuilder
|
||||
->add('activity', ActivityType::class, [
|
||||
'center' => $this->center,
|
||||
'role' => new Role('CHILL_ACTIVITY_CREATE'),
|
||||
'role' => 'CHILL_ACTIVITY_CREATE',
|
||||
])
|
||||
->getForm();
|
||||
|
||||
@@ -101,7 +96,7 @@ final class ActivityTypeTest extends KernelTestCase
|
||||
$form = $this->formBuilder
|
||||
->add('activity', ActivityType::class, [
|
||||
'center' => $this->center,
|
||||
'role' => new Role('CHILL_ACTIVITY_CREATE'),
|
||||
'role' => 'CHILL_ACTIVITY_CREATE',
|
||||
])
|
||||
->getForm();
|
||||
|
||||
@@ -157,7 +152,7 @@ final class ActivityTypeTest extends KernelTestCase
|
||||
$form = $builder
|
||||
->add('activity', ActivityType::class, [
|
||||
'center' => $this->center,
|
||||
'role' => new Role('CHILL_ACTIVITY_CREATE'),
|
||||
'role' => 'CHILL_ACTIVITY_CREATE',
|
||||
])
|
||||
->getForm();
|
||||
|
||||
|
Reference in New Issue
Block a user