19 declare(strict_types=1);
34 protected function setUp(): void
37 $this->
lng = $this->createMock(
ILIAS\Language\Language::class);
42 $this->not_true = $this->
refinery->logical()->not($group->constraint(
49 $this->not_false = $this->
refinery->logical()->not($group->constraint(
59 $this->assertTrue($this->not_false->accepts(
null));
64 $this->assertFalse($this->not_true->accepts(
null));
69 $this->not_false->check(
null);
70 $this->assertTrue(
true);
75 $this->expectException(UnexpectedValueException::class);
76 $this->not_true->check(
null);
81 $this->assertNull($this->not_false->problemWith(
null));
87 ->expects($this->once())
92 $this->assertEquals(
"-not_true-", $this->not_true->problemWith(
null));
97 $ok = $this->df->ok(
null);
99 $res = $this->not_false->applyTo($ok);
100 $this->assertTrue(
$res->isOk());
105 $not_ok = $this->df->ok(
null);
107 $res = $this->not_true->applyTo($not_ok);
108 $this->assertFalse(
$res->isOk());
113 $error = $this->df->error(
"error");
115 $res = $this->not_false->applyTo($error);
116 $this->assertSame($error,
$res);
121 $new_c = $this->not_true->withProblemBuilder(
static function ():
string {
122 return "This was a fault";
124 $this->assertEquals(
"This was a fault", $new_c->problemWith(
null));
Interface Observer Contains several chained tasks and infos about them.
A constraint encodes some resrtictions on values.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS Language Language $lng