ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ILIAS\Tests\Refinery\IdentityTransformationTest Class Reference
+ Inheritance diagram for ILIAS\Tests\Refinery\IdentityTransformationTest:
+ Collaboration diagram for ILIAS\Tests\Refinery\IdentityTransformationTest:

Public Member Functions

 testTransform ()
 
 testApplyToOk ()
 
 testApplyToError ()
 
- Public Member Functions inherited from ILIAS\Tests\Refinery\TestCase
 getLanguage ()
 

Detailed Description

Definition at line 28 of file IdentityTransformationTest.php.

Member Function Documentation

◆ testApplyToError()

ILIAS\Tests\Refinery\IdentityTransformationTest::testApplyToError ( )

Definition at line 47 of file IdentityTransformationTest.php.

References ILIAS\$error, and ILIAS\Refinery\applyTo().

47  : void
48  {
49  $error = new Error('some error');
50  $result = (new IdentityTransformation())->applyTo($error);
51  $this->assertEquals($error, $result);
52  }
ilErrorHandling $error
Definition: class.ilias.php:55
+ Here is the call graph for this function:

◆ testApplyToOk()

ILIAS\Tests\Refinery\IdentityTransformationTest::testApplyToOk ( )

Definition at line 39 of file IdentityTransformationTest.php.

References ILIAS\Refinery\applyTo().

39  : void
40  {
41  $value = ['im in an array'];
42  $result = (new IdentityTransformation())->applyTo(new Ok($value));
43  $this->assertInstanceOf(Ok::class, $result);
44  $this->assertEquals($value, $result->value());
45  }
+ Here is the call graph for this function:

◆ testTransform()

ILIAS\Tests\Refinery\IdentityTransformationTest::testTransform ( )

Definition at line 30 of file IdentityTransformationTest.php.

30  : void
31  {
32  $value = 'hejaaa';
33 
34  $actual = (new IdentityTransformation())->transform($value);
35 
36  $this->assertEquals($value, $actual);
37  }

The documentation for this class was generated from the following file: