Definition at line 25 of file IsNullConstraintTest.php.
◆ setUp()
IsNullConstraintTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 32 of file IsNullConstraintTest.php.
32 : void
33 {
34 $this->df = new DataFactory();
35 $this->
lng = $this->createMock(
ILIAS\Language\Language::class);
36 $this->f =
new Refinery($this->df, $this->
lng);
37
38 $this->c = $this->f->null();
39 }
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
References ILIAS\Repository\lng().
◆ testAccepts()
IsNullConstraintTest::testAccepts |
( |
| ) |
|
◆ testCheckFails()
IsNullConstraintTest::testCheckFails |
( |
| ) |
|
Definition at line 57 of file IsNullConstraintTest.php.
57 : void
58 {
59 $this->expectException(UnexpectedValueException::class);
60 $this->c->check(2);
61 }
◆ testCheckSucceed()
IsNullConstraintTest::testCheckSucceed |
( |
| ) |
|
◆ testNoProblemWith()
IsNullConstraintTest::testNoProblemWith |
( |
| ) |
|
◆ testNotAccepts()
IsNullConstraintTest::testNotAccepts |
( |
| ) |
|
◆ testProblemWith()
IsNullConstraintTest::testProblemWith |
( |
| ) |
|
Definition at line 68 of file IsNullConstraintTest.php.
68 : void
69 {
71 ->expects($this->once())
72 ->method("txt")
73 ->with("not_a_null")
74 ->willReturn("-%s-");
75
76 $this->assertEquals("-integer-", $this->c->problemWith(2));
77 }
References ILIAS\Repository\lng().
◆ testRestrictError()
IsNullConstraintTest::testRestrictError |
( |
| ) |
|
Definition at line 95 of file IsNullConstraintTest.php.
95 : void
96 {
97 $error = $this->df->error("error");
98
99 $res = $this->c->applyTo($error);
100 $this->assertSame($error,
$res);
101 }
References $res.
◆ testRestrictNotOk()
IsNullConstraintTest::testRestrictNotOk |
( |
| ) |
|
Definition at line 87 of file IsNullConstraintTest.php.
87 : void
88 {
89 $not_ok = $this->df->ok(2);
90
91 $res = $this->c->applyTo($not_ok);
92 $this->assertFalse(
$res->isOk());
93 }
References $res.
◆ testRestrictOk()
IsNullConstraintTest::testRestrictOk |
( |
| ) |
|
Definition at line 79 of file IsNullConstraintTest.php.
79 : void
80 {
81 $ok = $this->df->ok(null);
82
83 $res = $this->c->applyTo($ok);
84 $this->assertTrue(
$res->isOk());
85 }
References $res.
◆ testWithProblemBuilder()
IsNullConstraintTest::testWithProblemBuilder |
( |
| ) |
|
Definition at line 103 of file IsNullConstraintTest.php.
103 : void
104 {
105 $new_c = $this->c->withProblemBuilder(static function (): string {
106 return "This was a fault";
107 });
108 $this->assertEquals("This was a fault", $new_c->problemWith(2));
109 }
◆ $c
ILIAS Refinery Constraint IsNullConstraintTest::$c |
|
private |
◆ $df
DataFactory IsNullConstraintTest::$df |
|
private |
◆ $f
Refinery IsNullConstraintTest::$f |
|
private |
◆ $lng
ILIAS Language Language IsNullConstraintTest::$lng |
|
private |
The documentation for this class was generated from the following file: