Definition at line 26 of file ByTryingTransformTest.php.
 
◆ NullOrNumericDataProvider()
      
        
          | ByTryingTransformationTest::NullOrNumericDataProvider  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 39 of file ByTryingTransformTest.php.
   42             'empty string' => [
'', null],
    43             'empty string - one space' => [
' ', null],
    44             'empty string - more spaces' => [
'  ', null],
    45             'null' => [null, null],
    46             'string' => [
'str', self::ERROR],
    48             'negative int' => [-1, -1],
    50             'array' => [[], self::ERROR],
    51             'bool (false)' => [
false, self::ERROR],
    52             'bool (true)' => [
true, self::ERROR]
  
 
 
◆ NullOrNumericOrStringDataProvider()
      
        
          | ByTryingTransformationTest::NullOrNumericOrStringDataProvider  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 76 of file ByTryingTransformTest.php.
   79             'string' => [
'str', 
'str'],
    80             'null' => [null, null],
    81             'empty string' => [
'', null],
    83             'bool (true)' => [
true, self::ERROR],
    84             'array' => [[], self::ERROR]
  
 
 
◆ setUp()
  
  
      
        
          | ByTryingTransformationTest::setUp  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
 
◆ StringOrNullDataProvider()
      
        
          | ByTryingTransformationTest::StringOrNullDataProvider  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 108 of file ByTryingTransformTest.php.
  111             'string' => [
'str', 
'str'],
   112             'null' => [null, null],
   113             'empty string' => [
'', 
''],
   114             'int' => [1, self::ERROR],
   115             'array' => [[], self::ERROR]
  
 
 
◆ testNullOrNumeric()
      
        
          | ByTryingTransformationTest::testNullOrNumeric  | 
          ( | 
            | 
          $value,  | 
        
        
           | 
           | 
            | 
          $expected  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
NullOrNumericDataProvider 
- Parameters
 - 
  
    | mixed | $value |  | 
    | mixed | $expected |  | 
  
   
Definition at line 61 of file ByTryingTransformTest.php.
References ILIAS\Repository\refinery().
   63         $transformation = $this->
refinery->byTrying([
    64             $this->
refinery->numeric()->isNumeric(),
    68         if ($expected === self::ERROR) {
    69             $this->expectException(ConstraintViolationException::class);
    71         $transformed = $transformation->transform($value);
    72         $this->assertEquals($expected, $transformed);
 
 
 
 
◆ testNullOrNumericOrString()
      
        
          | ByTryingTransformationTest::testNullOrNumericOrString  | 
          ( | 
            | 
          $value,  | 
        
        
           | 
           | 
            | 
          $expected  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
NullOrNumericOrStringDataProvider 
- Parameters
 - 
  
    | mixed | $value |  | 
    | mixed | $expected |  | 
  
   
Definition at line 93 of file ByTryingTransformTest.php.
References ILIAS\Repository\refinery().
   95         $transformation = $this->
refinery->byTrying([
    97             $this->
refinery->numeric()->isNumeric(),
   101         if ($expected === self::ERROR) {
   102             $this->expectException(ConstraintViolationException::class);
   104         $transformed = $transformation->transform($value);
   105         $this->assertEquals($expected, $transformed);
 
 
 
 
◆ testStringOrNull()
      
        
          | ByTryingTransformationTest::testStringOrNull  | 
          ( | 
            | 
          $value,  | 
        
        
           | 
           | 
            | 
          $expected  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
StringOrNullDataProvider 
- Parameters
 - 
  
    | mixed | $value |  | 
    | mixed | $expected |  | 
  
   
Definition at line 124 of file ByTryingTransformTest.php.
References ILIAS\Repository\refinery().
  126         $transformation = $this->
refinery->byTrying([
   131         if ($expected === self::ERROR) {
   132             $this->expectException(ConstraintViolationException::class);
   134         $transformed = $transformation->transform($value);
   135         $this->assertEquals($expected, $transformed);
 
 
 
 
◆ $refinery
  
  
      
        
          | Refinery ByTryingTransformationTest::$refinery | 
         
       
   | 
  
private   | 
  
 
 
◆ ERROR
  
  
      
        
          | const ByTryingTransformationTest::ERROR = 'error_expected' | 
         
       
   | 
  
private   | 
  
 
 
The documentation for this class was generated from the following file: