Definition at line 10 of file IsNullConstraintTest.php.
◆ setUp()
IsNullConstraintTest::setUp |
( |
| ) |
|
Definition at line 12 of file IsNullConstraintTest.php.
14 $this->df =
new Data\Factory();
15 $this->lng = $this->createMock(\ilLanguage::class);
16 $this->f =
new Factory($this->df, $this->lng);
18 $this->c = $this->f->null();
◆ testAccepts()
IsNullConstraintTest::testAccepts |
( |
| ) |
|
◆ testCheckFails()
IsNullConstraintTest::testCheckFails |
( |
| ) |
|
◆ testCheckSucceed()
IsNullConstraintTest::testCheckSucceed |
( |
| ) |
|
◆ testNoProblemWith()
IsNullConstraintTest::testNoProblemWith |
( |
| ) |
|
◆ testNotAccepts()
IsNullConstraintTest::testNotAccepts |
( |
| ) |
|
◆ testProblemWith()
IsNullConstraintTest::testProblemWith |
( |
| ) |
|
Definition at line 48 of file IsNullConstraintTest.php.
51 ->expects($this->once())
56 $this->assertEquals(
"-integer-", $this->c->problemWith(2));
◆ testRestrictError()
IsNullConstraintTest::testRestrictError |
( |
| ) |
|
Definition at line 75 of file IsNullConstraintTest.php.
References $res.
77 $error = $this->df->error(
"error");
79 $res = $this->c->applyTo($error);
80 $this->assertSame($error,
$res);
foreach($_POST as $key=> $value) $res
◆ testRestrictNotOk()
IsNullConstraintTest::testRestrictNotOk |
( |
| ) |
|
Definition at line 67 of file IsNullConstraintTest.php.
References $res.
69 $not_ok = $this->df->ok(2);
71 $res = $this->c->applyTo($not_ok);
72 $this->assertFalse(
$res->isOk());
foreach($_POST as $key=> $value) $res
◆ testRestrictOk()
IsNullConstraintTest::testRestrictOk |
( |
| ) |
|
◆ testWithProblemBuilder()
IsNullConstraintTest::testWithProblemBuilder |
( |
| ) |
|
Definition at line 83 of file IsNullConstraintTest.php.
85 $new_c = $this->c->withProblemBuilder(
function () {
86 return "This was a fault";
88 $this->assertEquals(
"This was a fault", $new_c->problemWith(2));
The documentation for this class was generated from the following file: