ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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.

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:69
applyTo(Result $result)
@inheritDoc

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

+ Here is the call graph for this function:

◆ testApplyToOk()

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

Definition at line 39 of file IdentityTransformationTest.php.

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 }

References ILIAS\Refinery\applyTo().

+ 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 }

References ILIAS\Refinery\transform().

+ Here is the call graph for this function:

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