◆ setUp()
ILIAS\Tests\Setup\Condition\ExternalConditionObjectiveTest::setUp |
( |
| ) |
|
Definition at line 34 of file ExternalConditionObjectiveTest.php.
34 : void
35 {
36 $this->label_t = "condition_true";
37 $this->t = new Condition\ExternalConditionObjective(
38 $this->label_t,
39 function (Setup\Environment
$e) {
40 return true;
41 }
42 );
43 $this->label_f = "condition_false";
44 $this->f = new Condition\ExternalConditionObjective(
45 $this->label_f,
46 function (Setup\Environment
$e) {
47 return false;
48 }
49 );
50 }
References Vendor\Package\$e.
◆ testAchieveFalse()
ILIAS\Tests\Setup\Condition\ExternalConditionObjectiveTest::testAchieveFalse |
( |
| ) |
|
Definition at line 82 of file ExternalConditionObjectiveTest.php.
82 : void
83 {
84 $this->expectException(Setup\UnachievableException::class);
85 $env = $this->createMock(Setup\Environment::class);
86 $this->f->achieve($env);
87 }
◆ testAchieveTrue()
ILIAS\Tests\Setup\Condition\ExternalConditionObjectiveTest::testAchieveTrue |
( |
| ) |
|
◆ testGetHash()
ILIAS\Tests\Setup\Condition\ExternalConditionObjectiveTest::testGetHash |
( |
| ) |
|
◆ testGetLabel()
ILIAS\Tests\Setup\Condition\ExternalConditionObjectiveTest::testGetLabel |
( |
| ) |
|
Definition at line 62 of file ExternalConditionObjectiveTest.php.
62 : void
63 {
64 $this->assertIsString($this->f->getLabel());
65 $this->assertEquals($this->label_f, $this->f->getLabel());
66 $this->assertEquals($this->label_t, $this->t->getLabel());
67 }
◆ testGetPreconditions()
ILIAS\Tests\Setup\Condition\ExternalConditionObjectiveTest::testGetPreconditions |
( |
| ) |
|
Definition at line 74 of file ExternalConditionObjectiveTest.php.
74 : void
75 {
76 $env = $this->createMock(Setup\Environment::class);
77
78 $pre = $this->f->getPreconditions($env);
79 $this->assertEquals([], $pre);
80 }
◆ testHashIsDifferentForDifferentMessages()
ILIAS\Tests\Setup\Condition\ExternalConditionObjectiveTest::testHashIsDifferentForDifferentMessages |
( |
| ) |
|
◆ testIsNotable()
ILIAS\Tests\Setup\Condition\ExternalConditionObjectiveTest::testIsNotable |
( |
| ) |
|
◆ testNotExecutable()
ILIAS\Tests\Setup\Condition\ExternalConditionObjectiveTest::testNotExecutable |
( |
| ) |
|
Definition at line 96 of file ExternalConditionObjectiveTest.php.
96 : void
97 {
98 $env = $this->createMock(Setup\Environment::class);
99
100 $throws_not_executable = new Condition\ExternalConditionObjective(
101 "Not executable",
102 function (Setup\Environment
$e) {
103 return false;
104 },
105 null,
107 );
108
109 $this->expectException(Setup\NotExecutableException::class);
110 $throws_not_executable->achieve($env);
111 }
References Vendor\Package\$e, and true.
◆ testUnachievable()
ILIAS\Tests\Setup\Condition\ExternalConditionObjectiveTest::testUnachievable |
( |
| ) |
|
Definition at line 113 of file ExternalConditionObjectiveTest.php.
113 : void
114 {
115 $env = $this->createMock(Setup\Environment::class);
116
117 $throws_unachievable = new Condition\ExternalConditionObjective(
118 "Unachievable",
119 function (Setup\Environment
$e) {
120 return false;
121 },
122 null,
123 false
124 );
125
126 $this->expectException(Setup\UnachievableException::class);
127 $throws_unachievable->achieve($env);
128 }
References Vendor\Package\$e.
◆ $f
◆ $label_f
string ILIAS\Tests\Setup\Condition\ExternalConditionObjectiveTest::$label_f |
|
protected |
◆ $label_t
string ILIAS\Tests\Setup\Condition\ExternalConditionObjectiveTest::$label_t |
|
protected |
◆ $t
The documentation for this class was generated from the following file: