Definition at line 10 of file NotConstraintTest.php.
◆ setUp()
Definition at line 37 of file NotConstraintTest.php.
39 $this->df =
new Data\Factory();
40 $this->lng = $this->createMock(\ilLanguage::class);
41 $this->refinery = new \ILIAS\Refinery\Factory($this->df, $this->lng);
43 $group = $this->refinery->custom();
45 $this->not_true = $this->refinery->logical()->not($group->constraint(
52 $this->not_false = $this->refinery->logical()->not($group->constraint(
◆ testAccepts()
◆ testCheckFails()
NotTest::testCheckFails |
( |
| ) |
|
Definition at line 76 of file NotConstraintTest.php.
78 $this->expectException(\UnexpectedValueException::class);
79 $this->not_true->check(null);
◆ testCheckSucceed()
NotTest::testCheckSucceed |
( |
| ) |
|
◆ testNoProblemWith()
NotTest::testNoProblemWith |
( |
| ) |
|
◆ testNotAccepts()
NotTest::testNotAccepts |
( |
| ) |
|
◆ testProblemWith()
NotTest::testProblemWith |
( |
| ) |
|
Definition at line 87 of file NotConstraintTest.php.
90 ->expects($this->once())
95 $this->assertEquals(
"-not_true-", $this->not_true->problemWith(null));
◆ testRestrictError()
NotTest::testRestrictError |
( |
| ) |
|
Definition at line 114 of file NotConstraintTest.php.
References $res.
116 $error = $this->df->error(
"error");
118 $res = $this->not_false->applyTo($error);
119 $this->assertSame($error,
$res);
foreach($_POST as $key=> $value) $res
◆ testRestrictNotOk()
NotTest::testRestrictNotOk |
( |
| ) |
|
Definition at line 106 of file NotConstraintTest.php.
References $res.
108 $not_ok = $this->df->ok(null);
110 $res = $this->not_true->applyTo($not_ok);
111 $this->assertFalse(
$res->isOk());
foreach($_POST as $key=> $value) $res
◆ testRestrictOk()
NotTest::testRestrictOk |
( |
| ) |
|
Definition at line 98 of file NotConstraintTest.php.
References $ok, and $res.
100 $ok = $this->df->ok(null);
102 $res = $this->not_false->applyTo(
$ok);
103 $this->assertTrue(
$res->isOk());
foreach($_POST as $key=> $value) $res
◆ testWithProblemBuilder()
NotTest::testWithProblemBuilder |
( |
| ) |
|
Definition at line 122 of file NotConstraintTest.php.
124 $new_c = $this->not_true->withProblemBuilder(
function () {
125 return "This was a fault";
127 $this->assertEquals(
"This was a fault", $new_c->problemWith(null));
◆ $df
◆ $lng
◆ $not_false
◆ $not_true
◆ $refinery
The documentation for this class was generated from the following file: