Definition at line 9 of file NotConstraintTest.php.
◆ setUp()
Definition at line 11 of file NotConstraintTest.php.
13 $this->df =
new Data\Factory();
14 $this->lng = $this->createMock(\ilLanguage::class);
15 $this->f =
new Validation\Factory($this->df, $this->lng);
17 $this->not_true = $this->f->not($this->f->custom(
24 $this->not_false = $this->f->not($this->f->custom(
◆ testAccepts()
◆ testCheckFails()
NotTest::testCheckFails |
( |
| ) |
|
Definition at line 48 of file NotConstraintTest.php.
50 $this->expectException(\UnexpectedValueException::class);
51 $this->not_true->check(null);
◆ testCheckSucceed()
NotTest::testCheckSucceed |
( |
| ) |
|
◆ testNoProblemWith()
NotTest::testNoProblemWith |
( |
| ) |
|
◆ testNotAccepts()
NotTest::testNotAccepts |
( |
| ) |
|
◆ testProblemWith()
NotTest::testProblemWith |
( |
| ) |
|
Definition at line 59 of file NotConstraintTest.php.
References Sabre\Event\once().
62 ->expects($this->
once())
67 $this->assertEquals(
"-not_true-", $this->not_true->problemWith(null));
once($eventName, callable $callBack, $priority=100)
Subscribe to an event exactly once.
◆ testRestrictError()
NotTest::testRestrictError |
( |
| ) |
|
Definition at line 86 of file NotConstraintTest.php.
References $res.
88 $error = $this->df->error(
"error");
90 $res = $this->not_false->restrict($error);
91 $this->assertSame($error,
$res);
foreach($_POST as $key=> $value) $res
◆ testRestrictNotOk()
NotTest::testRestrictNotOk |
( |
| ) |
|
Definition at line 78 of file NotConstraintTest.php.
References $res.
80 $not_ok = $this->df->ok(null);
82 $res = $this->not_true->restrict($not_ok);
83 $this->assertFalse(
$res->isOk());
foreach($_POST as $key=> $value) $res
◆ testRestrictOk()
NotTest::testRestrictOk |
( |
| ) |
|
Definition at line 70 of file NotConstraintTest.php.
References $ok, and $res.
72 $ok = $this->df->ok(null);
74 $res = $this->not_false->restrict(
$ok);
75 $this->assertTrue(
$res->isOk());
foreach($_POST as $key=> $value) $res
◆ testWithProblemBuilder()
NotTest::testWithProblemBuilder |
( |
| ) |
|
Definition at line 94 of file NotConstraintTest.php.
96 $new_c = $this->not_true->withProblemBuilder(
function () {
97 return "This was a fault";
99 $this->assertEquals(
"This was a fault", $new_c->problemWith(null));
The documentation for this class was generated from the following file: