Remove usage of deprecated Role class

This commit is contained in:
2023-08-31 17:08:18 +02:00
parent 76142c1264
commit 7c58880139
33 changed files with 55 additions and 80 deletions

View File

@@ -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(

View File

@@ -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();