19 declare(strict_types=1);
    30     private \ILIAS\Refinery\Constraint 
$c;
    32     protected function setUp(): void
    35         $this->
lng = $this->createMock(ilLanguage::class);
    38         $this->c = $this->f->null();
    43         $this->assertTrue($this->c->accepts(null));
    48         $this->assertFalse($this->c->accepts(2));
    53         $this->c->check(null);
    54         $this->assertTrue(
true); 
    59         $this->expectException(UnexpectedValueException::class);
    65         $this->assertNull($this->c->problemWith(null));
    71             ->expects($this->once())
    76         $this->assertEquals(
"-integer-", $this->c->problemWith(2));
    81         $ok = $this->df->ok(null);
    83         $res = $this->c->applyTo($ok);
    84         $this->assertTrue(
$res->isOk());
    89         $not_ok = $this->df->ok(2);
    91         $res = $this->c->applyTo($not_ok);
    92         $this->assertFalse(
$res->isOk());
    97         $error = $this->df->error(
"error");
    99         $res = $this->c->applyTo($error);
   100         $this->assertSame($error, 
$res);
   105         $new_c = $this->c->withProblemBuilder(
static function (): 
string {
   106             return "This was a fault";
   108         $this->assertEquals(
"This was a fault", $new_c->problemWith(2));
 
ILIAS Refinery Constraint $c