Definition at line 28 of file ByTryingTransformTest.php.
 
◆ NullOrNumericDataProvider()
  
  
      
        
          | static ByTryingTransformTest::NullOrNumericDataProvider  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Definition at line 41 of file ByTryingTransformTest.php.
   44             'empty string' => [
'', null],
    45             'empty string - one space' => [
' ', null],
    46             'empty string - more spaces' => [
'  ', null],
    47             'null' => [null, null],
    48             'string' => [
'str', self::ERROR],
    50             'negative int' => [-1, -1],
    52             'array' => [[], self::ERROR],
    53             'bool (false)' => [
false, self::ERROR],
    54             'bool (true)' => [
true, self::ERROR]
  
 
 
◆ NullOrNumericOrStringDataProvider()
  
  
      
        
          | static ByTryingTransformTest::NullOrNumericOrStringDataProvider  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Definition at line 78 of file ByTryingTransformTest.php.
   81             'string' => [
'str', 
'str'],
    82             'null' => [null, null],
    83             'empty string' => [
'', null],
    85             'bool (true)' => [
true, self::ERROR],
    86             'array' => [[], self::ERROR]
  
 
 
◆ setUp()
  
  
      
        
          | ByTryingTransformTest::setUp  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
 
◆ StringOrNullDataProvider()
  
  
      
        
          | static ByTryingTransformTest::StringOrNullDataProvider  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Definition at line 110 of file ByTryingTransformTest.php.
  113             'string' => [
'str', 
'str'],
   114             'null' => [null, null],
   115             'empty string' => [
'', 
''],
   116             'int' => [1, self::ERROR],
   117             'array' => [[], self::ERROR]
  
 
 
◆ testNullOrNumeric()
      
        
          | ByTryingTransformTest::testNullOrNumeric  | 
          ( | 
            | 
          $value,  | 
        
        
           | 
           | 
            | 
          $expected  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
NullOrNumericDataProvider 
- Parameters
 - 
  
    | mixed | $value |  | 
    | mixed | $expected |  | 
  
   
Definition at line 63 of file ByTryingTransformTest.php.
References ILIAS\Repository\refinery().
   65         $transformation = $this->
refinery->byTrying([
    66             $this->
refinery->numeric()->isNumeric(),
    70         if ($expected === self::ERROR) {
    71             $this->expectException(ConstraintViolationException::class);
    73         $transformed = $transformation->transform($value);
    74         $this->assertEquals($expected, $transformed);
 
 
 
 
◆ testNullOrNumericOrString()
      
        
          | ByTryingTransformTest::testNullOrNumericOrString  | 
          ( | 
            | 
          $value,  | 
        
        
           | 
           | 
            | 
          $expected  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
NullOrNumericOrStringDataProvider 
- Parameters
 - 
  
    | mixed | $value |  | 
    | mixed | $expected |  | 
  
   
Definition at line 95 of file ByTryingTransformTest.php.
References ILIAS\Repository\refinery().
   97         $transformation = $this->
refinery->byTrying([
    99             $this->
refinery->numeric()->isNumeric(),
   103         if ($expected === self::ERROR) {
   104             $this->expectException(ConstraintViolationException::class);
   106         $transformed = $transformation->transform($value);
   107         $this->assertEquals($expected, $transformed);
 
 
 
 
◆ testStringOrNull()
      
        
          | ByTryingTransformTest::testStringOrNull  | 
          ( | 
            | 
          $value,  | 
        
        
           | 
           | 
            | 
          $expected  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
StringOrNullDataProvider 
- Parameters
 - 
  
    | mixed | $value |  | 
    | mixed | $expected |  | 
  
   
Definition at line 126 of file ByTryingTransformTest.php.
References ILIAS\Repository\refinery().
  128         $transformation = $this->
refinery->byTrying([
   133         if ($expected === self::ERROR) {
   134             $this->expectException(ConstraintViolationException::class);
   136         $transformed = $transformation->transform($value);
   137         $this->assertEquals($expected, $transformed);
 
 
 
 
◆ $refinery
  
  
      
        
          | Refinery ByTryingTransformTest::$refinery | 
         
       
   | 
  
private   | 
  
 
 
◆ ERROR
  
  
      
        
          | const ByTryingTransformTest::ERROR = 'error_expected' | 
         
       
   | 
  
private   | 
  
 
 
The documentation for this class was generated from the following file: