19 declare(strict_types=1);
    36         $this->assertTrue($constraint->
accepts($okValue));
    37         $this->assertFalse($constraint->
accepts($errorValue));
    51             $constraint->
check($errorValue);
    56         $this->assertTrue($raised);
    59             $constraint->
check($okValue);
    65         $this->assertFalse($raised);
    76         $this->assertNull($constraint->
problemWith($okValue));
    77         $this->assertIsString($constraint->
problemWith($errorValue));
    89         $ok = $rf->ok($okValue);
    90         $ok2 = $rf->ok($errorValue);
    91         $error = $rf->error(
'text');
    93         $result = $constraint->
applyTo($ok);
    94         $this->assertTrue($result->isOk());
    96         $result = $constraint->
applyTo($ok2);
    97         $this->assertTrue($result->isError());
    99         $result = $constraint->
applyTo($error);
   100         $this->assertSame($error, $result);
   112             return "This was a vault";
   114         $this->assertEquals(
"This was a vault", $new_constraint->problemWith($errorValue));
   122         $language = 
new class () implements \
ILIAS\Language\Language {
   123             public function txt(
string $a_topic, 
string $a_default_lang_fallback_mod = 
""): 
string   127             public function loadLanguageModule(
string $a_module): 
void 
problemWith($value)
Tells what the problem with the provided value is. 
 
testRestrict(LogicalOr $constraint, $okValue, $errorValue)
constraintsProvider 
 
Interface Observer  Contains several chained tasks and infos about them. 
 
testAccept(LogicalOr $constraint, $okValue, $errorValue)
constraintsProvider 
 
withProblemBuilder(callable $builder)
Get a constraint like this one with a builder for a custom error message. 
 
testProblemWith(LogicalOr $constraint, $okValue, $errorValue)
constraintsProvider 
 
applyTo(Result $result)
Restricts a Result. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static constraintsProvider()
 
accepts($value)
Tells if the provided value complies. 
 
testCheck(LogicalOr $constraint, $okValue, $errorValue)
constraintsProvider 
 
check($value)
Checks the provided value. 
 
testWithProblemBuilder(LogicalOr $constraint, $okValue, $errorValue)
constraintsProvider