Definition at line 35 of file UserLanguageTest.php.
◆ testAsComponent()
ILIAS\LegalDocuments\test\Condition\UserLanguageTest::testAsComponent |
( |
| ) |
|
Definition at line 48 of file UserLanguageTest.php.
50 $legacy = $this->mock(Legacy\Content::class);
51 $legacy_factory = $this->mock(Legacy\Factory::class);
53 ->expects($this->once())
55 ->willReturn($legacy);
57 $instance =
new UserLanguage(
58 $this->mockTree(CriterionContent::class, [
'arguments' => [
'lng' =>
'foo']]),
59 $this->mock(UserLanguageDefinition::class),
60 $this->mockTree(UIFactory::class, [
'legacy' => $legacy_factory])
63 $this->assertSame($legacy, $instance->asComponent());
◆ testConstruct()
ILIAS\LegalDocuments\test\Condition\UserLanguageTest::testConstruct |
( |
| ) |
|
Definition at line 39 of file UserLanguageTest.php.
41 $this->assertInstanceOf(UserLanguage::class,
new UserLanguage(
42 $this->mock(CriterionContent::class),
43 $this->mock(UserLanguageDefinition::class),
44 $this->mock(UIFactory::class)
◆ testDefinition()
ILIAS\LegalDocuments\test\Condition\UserLanguageTest::testDefinition |
( |
| ) |
|
Definition at line 77 of file UserLanguageTest.php.
79 $definition = $this->mock(UserLanguageDefinition::class);
80 $instance =
new UserLanguage(
81 $this->mock(CriterionContent::class),
83 $this->mock(UIFactory::class)
86 $this->assertSame($definition, $instance->definition());
◆ testEval()
ILIAS\LegalDocuments\test\Condition\UserLanguageTest::testEval |
( |
| ) |
|
Definition at line 66 of file UserLanguageTest.php.
68 $instance =
new UserLanguage(
69 $this->mockTree(CriterionContent::class, [
'arguments' => [
'lng' =>
'foo']]),
70 $this->mock(UserLanguageDefinition::class),
71 $this->mock(UIFactory::class)
74 $this->assertTrue($instance->eval($this->mockTree(ilObjUser::class, [
'getLanguage' =>
'foo'])));
◆ testKnownToNeverMatchWith()
ILIAS\LegalDocuments\test\Condition\UserLanguageTest::testKnownToNeverMatchWith |
( |
| ) |
|
Definition at line 89 of file UserLanguageTest.php.
91 $instance =
new UserLanguage(
92 $this->mock(CriterionContent::class),
93 $this->mock(UserLanguageDefinition::class),
94 $this->mock(UIFactory::class)
97 $second =
new UserLanguage(
98 $this->mock(CriterionContent::class),
99 $this->mock(UserLanguageDefinition::class),
100 $this->mock(UIFactory::class)
103 $this->assertTrue($instance->knownToNeverMatchWith($second));
104 $this->assertFalse($instance->knownToNeverMatchWith($this->mock(Condition::class)));
The documentation for this class was generated from the following file: