19 declare(strict_types=1);
    37     protected function setUp(): void
    40         $this->
lng = $this->getMockBuilder(Language::class)
    41             ->disableOriginalConstructor()
    44         $this->less_than = 10;
    55         $this->assertTrue($this->c->accepts(2));
    60         $this->assertFalse($this->c->accepts(10));
    66         $this->assertTrue(
true); 
    71         $this->expectException(UnexpectedValueException::class);
    77         $this->assertNull($this->c->problemWith(1));
    83             ->expects($this->once())
    85             ->with(
"not_less_than")
    86             ->willReturn(
"-%s-%s-");
    88         $this->assertEquals(
"-12-{$this->less_than}-", $this->c->problemWith(
"12"));
    93         $ok = $this->df->ok(1);
    95         $res = $this->c->applyTo($ok);
    96         $this->assertTrue(
$res->isOk());
   101         $not_ok = $this->df->ok(1234);
   103         $res = $this->c->applyTo($not_ok);
   104         $this->assertFalse(
$res->isOk());
   109         $error = $this->df->error(
"error");
   117         $new_c = $this->c->withProblemBuilder(
static function (): 
string {
   118             return "This was a fault";
   120         $this->assertEquals(
"This was a fault", $new_c->problemWith(13));
 
A constraint encodes some resrtictions on values. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...