3 declare(strict_types=1);
32 protected function setUp(): void
39 $transformedValue = $this->transformation->transform(200);
41 $this->assertEquals(200, $transformedValue);
46 $transformedValue = $this->transformation->transform(-200);
48 $this->assertEquals(-200, $transformedValue);
53 $transformedValue = $this->transformation->transform(0);
55 $this->assertEquals(0, $transformedValue);
60 $this->expectNotToPerformAssertions();
63 $transformedValue = $this->transformation->transform(
'hello');
73 $this->expectNotToPerformAssertions();
76 $transformedValue = $this->transformation->transform(10.5);
86 $this->expectNotToPerformAssertions();
89 $transformedValue = $this->transformation->transform(
true);
99 $this->expectNotToPerformAssertions();
102 $transformedValue = $this->transformation->transform(
false);
112 $resultObject =
new Result\Ok(
'hello');
114 $transformedObject = $this->transformation->applyTo($resultObject);
116 $this->assertTrue($transformedObject->isError());
121 $resultObject =
new Result\Ok(200);
123 $transformedObject = $this->transformation->applyTo($resultObject);
125 $this->assertEquals(200, $transformedObject->value());
130 $resultObject =
new Result\Ok(-200);
132 $transformedObject = $this->transformation->applyTo($resultObject);
134 $this->assertEquals(-200, $transformedObject->value());
139 $resultObject =
new Result\Ok(0);
141 $transformedObject = $this->transformation->applyTo($resultObject);
143 $this->assertEquals(0, $transformedObject->value());
148 $resultObject =
new Result\Ok(10.5);
150 $transformedObject = $this->transformation->applyTo($resultObject);
152 $this->assertTrue($transformedObject->isError());
157 $resultObject =
new Result\Ok(
true);
159 $transformedObject = $this->transformation->applyTo($resultObject);
161 $this->assertTrue($transformedObject->isError());
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...