◆ setUp()
SequentialConstraintTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 33 of file SequentialConstraintTest.php.
33 : void
34 {
35 $this->df = new DataFactory();
36 $this->
lng = $this->createMock(
ILIAS\Language\Language::class);
37 $this->
refinery =
new Refinery($this->df, $this->
lng);
38
40
41 $greater_than_3 = $group->constraint(
42 function ($value) {
43 return $value > 3;
44 },
45 "not_greater_than_3"
46 );
47
48 $less_than_5 = $group->constraint(
49 function ($value) {
50 return $value < 5;
51 },
52 "not_less_than_5"
53 );
54
56 ->logical()
57 ->sequential([$greater_than_3, $less_than_5]);
58 }
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
References ILIAS\Repository\lng(), and ILIAS\Repository\refinery().
◆ testAccepts()
SequentialConstraintTest::testAccepts |
( |
| ) |
|
◆ testCheckFails()
SequentialConstraintTest::testCheckFails |
( |
| ) |
|
Definition at line 76 of file SequentialConstraintTest.php.
76 : void
77 {
78 $this->expectException(UnexpectedValueException::class);
79 $this->c->check(2);
80 }
◆ testCheckSucceed()
SequentialConstraintTest::testCheckSucceed |
( |
| ) |
|
◆ testNoProblemWith()
SequentialConstraintTest::testNoProblemWith |
( |
| ) |
|
◆ testNotAccepts()
SequentialConstraintTest::testNotAccepts |
( |
| ) |
|
◆ testProblemWith1()
SequentialConstraintTest::testProblemWith1 |
( |
| ) |
|
◆ testProblemWith2()
SequentialConstraintTest::testProblemWith2 |
( |
| ) |
|
◆ testRestrictError()
SequentialConstraintTest::testRestrictError |
( |
| ) |
|
Definition at line 121 of file SequentialConstraintTest.php.
121 : void
122 {
123 $error = $this->df->error("error");
124
125 $res = $this->c->applyTo($error);
126 $this->assertSame($error,
$res);
127 }
References $res.
◆ testRestrictNotOk()
SequentialConstraintTest::testRestrictNotOk |
( |
| ) |
|
◆ testRestrictOk()
SequentialConstraintTest::testRestrictOk |
( |
| ) |
|
◆ testWithProblemBuilder()
SequentialConstraintTest::testWithProblemBuilder |
( |
| ) |
|
Definition at line 129 of file SequentialConstraintTest.php.
129 : void
130 {
131 $new_c = $this->c->withProblemBuilder(static function (): string {
132 return "This was a fault";
133 });
134 $this->assertEquals("This was a fault", $new_c->problemWith(7));
135 }
◆ $c
◆ $df
DataFactory SequentialConstraintTest::$df |
|
private |
◆ $lng
ILIAS Language Language SequentialConstraintTest::$lng |
|
private |
◆ $refinery
Refinery SequentialConstraintTest::$refinery |
|
private |
The documentation for this class was generated from the following file: