Definition at line 30 of file TentativelyTest.php.
◆ setUp()
ILIAS\Tests\Setup\Objective\TentativelyTest::setUp |
( |
| ) |
|
Definition at line 39 of file TentativelyTest.php.
41 $this->objective = $this->newObjective();
42 $this->precondition = $this->newObjective();
44 $this->tentatively =
new Objective\Tentatively($this->objective);
45 $this->double_tentatively =
new Objective\Tentatively($this->tentatively);
◆ testAchieve()
ILIAS\Tests\Setup\Objective\TentativelyTest::testAchieve |
( |
| ) |
|
Definition at line 122 of file TentativelyTest.php.
References $res.
124 $env = $this->createMock(Setup\Environment::class);
127 ->expects($this->once())
132 $res = $this->tentatively->achieve($env);
133 $this->assertSame($env,
$res);
◆ testAchieveThrows()
ILIAS\Tests\Setup\Objective\TentativelyTest::testAchieveThrows |
( |
| ) |
|
Definition at line 136 of file TentativelyTest.php.
References $res.
138 $env = $this->createMock(Setup\Environment::class);
141 ->expects($this->once())
144 ->will($this->throwException(
new Setup\UnachievableException()));
146 $res = $this->tentatively->achieve($env);
147 $this->assertSame($env,
$res);
◆ testDoubleTentativelyGetHash()
ILIAS\Tests\Setup\Objective\TentativelyTest::testDoubleTentativelyGetHash |
( |
| ) |
|
Definition at line 56 of file TentativelyTest.php.
59 $this->tentatively->getHash(),
60 $this->double_tentatively->getHash()
◆ testDoubleTentativelyGetLabel()
ILIAS\Tests\Setup\Objective\TentativelyTest::testDoubleTentativelyGetLabel |
( |
| ) |
|
Definition at line 79 of file TentativelyTest.php.
81 $label =
"some_label";
88 $this->tentatively->getLabel(),
89 $this->double_tentatively->getLabel()
◆ testGetHash()
ILIAS\Tests\Setup\Objective\TentativelyTest::testGetHash |
( |
| ) |
|
Definition at line 48 of file TentativelyTest.php.
51 "tentatively " . $this->objective->getHash(),
52 $this->tentatively->getHash()
◆ testGetLabel()
ILIAS\Tests\Setup\Objective\TentativelyTest::testGetLabel |
( |
| ) |
|
Definition at line 64 of file TentativelyTest.php.
66 $label =
"some_label";
69 ->expects($this->once())
74 "Tentatively: $label",
75 $this->tentatively->getLabel()
◆ testGetPreconditions()
ILIAS\Tests\Setup\Objective\TentativelyTest::testGetPreconditions |
( |
| ) |
|
Definition at line 104 of file TentativelyTest.php.
106 $other = $this->newObjective();
108 $env = $this->createMock(Setup\Environment::class);
111 ->expects($this->once())
112 ->method(
"getPreconditions")
114 ->willReturn([$other]);
117 [
new Objective\Tentatively($other)],
118 $this->tentatively->getPreconditions($env)
◆ testIsApplicable()
ILIAS\Tests\Setup\Objective\TentativelyTest::testIsApplicable |
( |
| ) |
|
Definition at line 150 of file TentativelyTest.php.
152 $env = $this->createMock(Setup\Environment::class);
153 $is_applicable = random_int(0, 1) == 1;
156 ->expects($this->once())
157 ->method(
"isApplicable")
159 ->willReturn($is_applicable);
161 $this->assertEquals($is_applicable, $this->tentatively->isApplicable($env));
◆ testIsNotable()
ILIAS\Tests\Setup\Objective\TentativelyTest::testIsNotable |
( |
| ) |
|
Definition at line 92 of file TentativelyTest.php.
98 ->willReturn($notable);
100 $this->assertEquals($notable, $this->tentatively->isNotable());
101 $this->assertEquals($notable, $this->double_tentatively->isNotable());
◆ $double_tentatively
◆ $objective
Setup Objective ILIAS\Tests\Setup\Objective\TentativelyTest::$objective |
|
protected |
◆ $precondition
Setup Objective ILIAS\Tests\Setup\Objective\TentativelyTest::$precondition |
|
protected |
◆ $tentatively
The documentation for this class was generated from the following file: