Definition at line 26 of file ParallelConstraintsTest.php.
◆ setUp()
ParallelConstraintsTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 33 of file ParallelConstraintsTest.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 $less_than_3 = $group->constraint(
42 static function ($value): bool {
43 return $value < 3;
44 },
45 "not_less_than_3"
46 );
47
48 $less_than_5 = $group->constraint(
49 static function ($value): bool {
50 return $value < 5;
51 },
52 "not_less_than_5"
53 );
54
56 ->logical()
57 ->parallel([$less_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()
ParallelConstraintsTest::testAccepts |
( |
| ) |
|
◆ testCheckFails()
ParallelConstraintsTest::testCheckFails |
( |
| ) |
|
Definition at line 76 of file ParallelConstraintsTest.php.
76 : void
77 {
78 $this->expectException(UnexpectedValueException::class);
79 $this->c->check(6);
80 }
◆ testCheckSucceed()
ParallelConstraintsTest::testCheckSucceed |
( |
| ) |
|
◆ testNoProblemWith()
ParallelConstraintsTest::testNoProblemWith |
( |
| ) |
|
◆ testNotAccepts()
ParallelConstraintsTest::testNotAccepts |
( |
| ) |
|
◆ testProblemWith1()
ParallelConstraintsTest::testProblemWith1 |
( |
| ) |
|
◆ testProblemWith2()
ParallelConstraintsTest::testProblemWith2 |
( |
| ) |
|
◆ testRestrictError()
ParallelConstraintsTest::testRestrictError |
( |
| ) |
|
Definition at line 121 of file ParallelConstraintsTest.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()
ParallelConstraintsTest::testRestrictNotOk |
( |
| ) |
|
Definition at line 113 of file ParallelConstraintsTest.php.
113 : void
114 {
115 $not_ok = $this->df->ok(7);
116
117 $res = $this->c->applyTo($not_ok);
118 $this->assertFalse(
$res->isOk());
119 }
References $res.
◆ testRestrictOk()
ParallelConstraintsTest::testRestrictOk |
( |
| ) |
|
◆ testWithProblemBuilder()
ParallelConstraintsTest::testWithProblemBuilder |
( |
| ) |
|
Definition at line 129 of file ParallelConstraintsTest.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 ParallelConstraintsTest::$df |
|
private |
◆ $lng
ILIAS Language Language ParallelConstraintsTest::$lng |
|
private |
◆ $refinery
Refinery ParallelConstraintsTest::$refinery |
|
private |
The documentation for this class was generated from the following file: