19 declare(strict_types=1);
34 require_once __DIR__ .
'/../../ContainerMock.php';
43 $this->mock(UI::class),
44 $this->mock(ilObjectDataCache::class),
45 $this->mock(ilRbacReview::class),
52 if (!defined(
'SYSTEM_ROLE_ID')) {
53 define(
'SYSTEM_ROLE_ID', 2);
57 $this->mock(UI::class),
58 $this->mock(ilObjectDataCache::class),
59 $this->mock(ilRbacReview::class),
60 fn() => $this->mock(Constraint::class)
63 $this->assertInstanceOf(Group::class, $instance->formGroup());
69 $this->mock(UI::class),
70 $this->mockMethod(ilObjectDataCache::class,
'lookupTitle', [87],
'foo'),
71 $this->mock(ilRbacReview::class),
75 $this->assertSame(
'foo', $instance->translatedRole(87));
81 $this->mockMethod(UI::class,
'txt', [
'crit_type_usr_global_role'],
'foo'),
82 $this->mock(ilObjectDataCache::class),
83 $this->mock(ilRbacReview::class),
87 $this->assertSame(
'foo', $instance->translatedType());
93 $this->mock(UI::class),
94 $this->mock(ilObjectDataCache::class),
95 $this->mock(ilRbacReview::class),
99 $this->assertInstanceOf(Role::class, $instance->withCriterion($this->mock(CriterionContent::class)));