TestCase for the parellel constraint.
More...
◆ setUp()
Definition at line 32 of file ParallelConstraintsTest.php.
34 $this->df =
new Data\Factory();
35 $this->lng = $this->createMock(\ilLanguage::class);
36 $this->refinery = new \ILIAS\Refinery\Factory($this->df, $this->lng);
38 $group = $this->refinery->custom();
40 $this->less_than_3 = $group->constraint(
47 $this->less_than_5 = $group->constraint(
54 $this->c = $this->refinery
56 ->parallel([$this->less_than_3, $this->less_than_5]);
◆ testAccepts()
ParallelTest::testAccepts |
( |
| ) |
|
◆ testCheckFails()
ParallelTest::testCheckFails |
( |
| ) |
|
◆ testCheckSucceed()
ParallelTest::testCheckSucceed |
( |
| ) |
|
◆ testNoProblemWith()
ParallelTest::testNoProblemWith |
( |
| ) |
|
◆ testNotAccepts()
ParallelTest::testNotAccepts |
( |
| ) |
|
◆ testProblemWith1()
ParallelTest::testProblemWith1 |
( |
| ) |
|
Definition at line 86 of file ParallelConstraintsTest.php.
89 ->expects($this->never())
92 $this->assertEquals(
"not_less_than_3", $this->c->problemWith(4));
◆ testProblemWith2()
ParallelTest::testProblemWith2 |
( |
| ) |
|
Definition at line 95 of file ParallelConstraintsTest.php.
98 ->expects($this->never())
101 $this->assertEquals(
"not_less_than_3 not_less_than_5", $this->c->problemWith(6));
◆ testRestrictError()
ParallelTest::testRestrictError |
( |
| ) |
|
Definition at line 120 of file ParallelConstraintsTest.php.
References $res.
122 $error = $this->df->error(
"error");
124 $res = $this->c->applyTo($error);
125 $this->assertSame($error,
$res);
foreach($_POST as $key=> $value) $res
◆ testRestrictNotOk()
ParallelTest::testRestrictNotOk |
( |
| ) |
|
Definition at line 112 of file ParallelConstraintsTest.php.
References $res.
114 $not_ok = $this->df->ok(7);
116 $res = $this->c->applyTo($not_ok);
117 $this->assertFalse(
$res->isOk());
foreach($_POST as $key=> $value) $res
◆ testRestrictOk()
ParallelTest::testRestrictOk |
( |
| ) |
|
◆ testWithProblemBuilder()
ParallelTest::testWithProblemBuilder |
( |
| ) |
|
Definition at line 128 of file ParallelConstraintsTest.php.
130 $new_c = $this->c->withProblemBuilder(
function () {
131 return "This was a fault";
133 $this->assertEquals(
"This was a fault", $new_c->problemWith(7));
◆ $df
◆ $lng
◆ $refinery
The documentation for this class was generated from the following file: