Definition at line 36 of file RoleTest.php.
◆ testAsComponent()
ILIAS\LegalDocuments\test\Condition\RoleTest::testAsComponent |
( |
| ) |
|
Definition at line 50 of file RoleTest.php.
References ILIAS\LegalDocuments\Condition\asComponent().
52 $legacy = $this->mock(Legacy\Content::class);
53 $legacy_factory = $this->mock(Legacy\Factory::class);
55 ->expects($this->once())
57 ->willReturn($legacy);
59 $this->assertSame($legacy, (
new Role(
60 $this->mockTree(CriterionContent::class, [
'arguments' => [
'role_id' => 78]]),
61 $this->mock(RoleDefinition::class),
62 $this->mockTree(UIFactory::class, [
'legacy' => $legacy_factory]),
63 $this->mock(ilRbacReview::class)
◆ testConstruct()
ILIAS\LegalDocuments\test\Condition\RoleTest::testConstruct |
( |
| ) |
|
Definition at line 40 of file RoleTest.php.
42 $this->assertInstanceOf(Role::class,
new Role(
43 $this->mock(CriterionContent::class),
44 $this->mock(RoleDefinition::class),
45 $this->mock(UIFactory::class),
46 $this->mock(ilRbacReview::class)
◆ testDefinition()
ILIAS\LegalDocuments\test\Condition\RoleTest::testDefinition |
( |
| ) |
|
Definition at line 81 of file RoleTest.php.
83 $definition = $this->mock(RoleDefinition::class);
86 $this->mock(CriterionContent::class),
88 $this->mock(UIFactory::class),
89 $this->mock(ilRbacReview::class)
92 $this->assertSame($definition, $instance->definition());
◆ testEval()
ILIAS\LegalDocuments\test\Condition\RoleTest::testEval |
( |
| ) |
|
Definition at line 67 of file RoleTest.php.
69 $rbac = $this->mockMethod(ilRbacReview::class,
'isAssigned', [45, 78],
true);
72 $this->mockTree(CriterionContent::class, [
'arguments' => [
'role_id' => 78]]),
73 $this->mock(RoleDefinition::class),
74 $this->mock(UIFactory::class),
78 $this->assertTrue($instance->eval($this->mockTree(ilObjUser::class, [
'getId' => 45])));
◆ testKnownToNeverMatchWith()
ILIAS\LegalDocuments\test\Condition\RoleTest::testKnownToNeverMatchWith |
( |
| ) |
|
Definition at line 95 of file RoleTest.php.
98 $this->mock(CriterionContent::class),
99 $this->mock(RoleDefinition::class),
100 $this->mock(UIFactory::class),
101 $this->mock(ilRbacReview::class)
104 $this->assertFalse($instance->knownToNeverMatchWith($this->mock(Condition::class)));
The documentation for this class was generated from the following file:
- components/ILIAS/LegalDocuments/tests/Condition/RoleTest.php