Definition at line 43 of file CustomTest.php.
 
◆ setUp()
  
  
      
        
          | ValidationConstraintsCustomTest::setUp  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
 
◆ test_exception_on_no_parameter()
      
        
          | ValidationConstraintsCustomTest::test_exception_on_no_parameter  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 96 of file CustomTest.php.
   98         $lng_closure = $this->constraint->_getLngClosure();
   100         $this->expectException(InvalidArgumentException::class);
  
 
 
◆ test_gracefully_handle_arrays_and_objects()
      
        
          | ValidationConstraintsCustomTest::test_gracefully_handle_arrays_and_objects  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 121 of file CustomTest.php.
References $res, and ILIAS\Repository\lng().
  123         $lng_closure = $this->constraint->_getLngClosure();
   126             ->expects($this->once())
   129             ->willReturn(
"%s-%s-%s-%s-");
   133         $res = $lng_closure(
"id", [], 
new stdClass(), 
"foo", null);
   135         $this->assertEquals(
"array-" . stdClass::class . 
"-foo-null-", 
$res);
 
 
 
 
◆ test_no_sprintf_on_one_parameter()
      
        
          | ValidationConstraintsCustomTest::test_no_sprintf_on_one_parameter  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 105 of file CustomTest.php.
References $res, and ILIAS\Repository\lng().
  107         $lng_closure = $this->constraint->_getLngClosure();
   111             ->expects($this->once())
   113             ->with($this->txt_id)
   114             ->willReturn($txt_out);
   116         $res = $lng_closure($this->txt_id);
   118         $this->assertEquals($txt_out, 
$res);
 
 
 
 
◆ test_use_txt()
      
        
          | ValidationConstraintsCustomTest::test_use_txt  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 81 of file CustomTest.php.
References ILIAS\Repository\lng().
   85             ->expects($this->once())
    88             ->willReturn($txt_out);
    91         $problem = $this->constraint->problemWith($value);
    93         $this->assertEquals(sprintf($txt_out, $value), $problem);
 
 
 
 
◆ testProblemBuilderRetrievesLngClosure()
      
        
          | ValidationConstraintsCustomTest::testProblemBuilderRetrievesLngClosure  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ testWithProblemBuilder()
      
        
          | ValidationConstraintsCustomTest::testWithProblemBuilder  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 62 of file CustomTest.php.
   64         $new_constraint = $this->constraint->withProblemBuilder(
static function (): 
string {
    65             return "This was a fault";
    67         $this->assertEquals(
"This was a fault", $new_constraint->problemWith(
""));
  
 
 
◆ $constraint
◆ $lng
◆ $txt_id
  
  
      
        
          | string ValidationConstraintsCustomTest::$txt_id = '' | 
         
       
   | 
  
private   | 
  
 
 
The documentation for this class was generated from the following file: