◆ setUp()
  
  
      
        
          | HasMaxLengthConstraintTest::setUp  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
 
◆ testAccepts1()
      
        
          | HasMaxLengthConstraintTest::testAccepts1  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ testAccepts2()
      
        
          | HasMaxLengthConstraintTest::testAccepts2  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ testCheckFails()
      
        
          | HasMaxLengthConstraintTest::testCheckFails  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 68 of file HasMaxLengthConstraintTest.php.
   68                                    : void
   69    {
   70        $this->expectException(\UnexpectedValueException::class);
   71        $this->c->check("123");
   72    }
 
 
 
◆ testCheckSucceed()
      
        
          | HasMaxLengthConstraintTest::testCheckSucceed  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ testNoProblemWith()
      
        
          | HasMaxLengthConstraintTest::testNoProblemWith  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ testNotAccepts()
      
        
          | HasMaxLengthConstraintTest::testNotAccepts  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ testProblemWith()
      
        
          | HasMaxLengthConstraintTest::testProblemWith  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 79 of file HasMaxLengthConstraintTest.php.
   79                                     : void
   80    {
   82            ->expects($this->once())
   83            ->method("txt")
   84            ->with("not_max_length")
   85            ->willReturn("-%s-");
   86 
   87        $this->assertEquals("-2-", $this->c->problemWith("123"));
   88    }
 
References ILIAS\Repository\lng().
 
 
◆ testRestrictError()
      
        
          | HasMaxLengthConstraintTest::testRestrictError  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ testRestrictNotOk()
      
        
          | HasMaxLengthConstraintTest::testRestrictNotOk  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ testRestrictOk()
      
        
          | HasMaxLengthConstraintTest::testRestrictOk  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ testWithProblemBuilder()
      
        
          | HasMaxLengthConstraintTest::testWithProblemBuilder  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 114 of file HasMaxLengthConstraintTest.php.
  114                                            : void
  115    {
  116        $new_c = $this->c->withProblemBuilder(static function (): string {
  117            return "This was a fault";
  118        });
  119        $this->assertEquals("This was a fault", $new_c->problemWith("123"));
  120    }
 
 
 
◆ $c
◆ $df
  
  
      
        
          | DataFactory HasMaxLengthConstraintTest::$df | 
         
       
   | 
  
private   | 
  
 
 
◆ $lng
◆ $max_length
  
  
      
        
          | int HasMaxLengthConstraintTest::$max_length | 
         
       
   | 
  
private   | 
  
 
 
The documentation for this class was generated from the following file: