33 $this->objective = $this->newObjective();
34 $this->precondition = $this->newObjective();
36 $this->tentatively =
new Objective\Tentatively($this->objective);
37 $this->double_tentatively =
new Objective\Tentatively($this->tentatively);
43 "tentatively " . $this->objective->getHash(),
44 $this->tentatively->getHash()
51 $this->tentatively->getHash(),
52 $this->double_tentatively->getHash()
58 $label =
"some_label";
61 ->expects($this->once())
66 "Tentatively: $label",
67 $this->tentatively->getLabel()
73 $label =
"some_label";
80 $this->tentatively->getLabel(),
81 $this->double_tentatively->getLabel()
90 ->willReturn($notable);
92 $this->assertEquals($notable, $this->tentatively->isNotable());
93 $this->assertEquals($notable, $this->double_tentatively->isNotable());
98 $other = $this->newObjective();
100 $env = $this->createMock(Setup\Environment::class);
103 ->expects($this->once())
104 ->method(
"getPreconditions")
106 ->willReturn([$other]);
110 $this->tentatively->getPreconditions($env)
116 $env = $this->createMock(Setup\Environment::class);
119 ->expects($this->once())
124 $res = $this->tentatively->achieve($env);
125 $this->assertSame($env,
$res);
130 $env = $this->createMock(Setup\Environment::class);
133 ->expects($this->once())
138 $res = $this->tentatively->achieve($env);
139 $this->assertSame($env,
$res);
144 $env = $this->createMock(Setup\Environment::class);
145 $is_applicable = random_int(0, 1) == 1;
148 ->expects($this->once())
149 ->method(
"isApplicable")
151 ->willReturn($is_applicable);
153 $this->assertEquals($is_applicable, $this->tentatively->isApplicable($env));
An objective is a desired state of the system that is supposed to be created by the setup...
Signals that some goal won't be achievable by actions of the system ever.
foreach($_POST as $key=> $value) $res
testDoubleTentativelyGetHash()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
A wrapper around an objective that attempts to achieve the wrapped objective but won't stop the proce...
testDoubleTentativelyGetLabel()