3 declare(strict_types=1);
32 protected function setUp(): void
39 $this->expectNotToPerformAssertions();
42 $transformedValue = $this->transformation->transform(200);
52 $this->expectNotToPerformAssertions();
55 $transformedValue = $this->transformation->transform(
'hello');
65 $transformedValue = $this->transformation->transform(10.5);
67 $this->assertEquals(10.5, $transformedValue);
72 $this->expectNotToPerformAssertions();
75 $transformedValue = $this->transformation->transform(-200);
85 $this->expectNotToPerformAssertions();
88 $transformedValue = $this->transformation->transform(0);
98 $transformedValue = $this->transformation->transform(0.0);
100 $this->assertEquals(0.0, $transformedValue);
105 $resultObject =
new Result\Ok(200);
107 $transformedObject = $this->transformation->applyTo($resultObject);
109 $this->assertTrue($transformedObject->isError());
114 $resultObject =
new Result\Ok(-200);
116 $transformedObject = $this->transformation->applyTo($resultObject);
118 $this->assertTrue($transformedObject->isError());
123 $resultObject =
new Result\Ok(0);
125 $transformedObject = $this->transformation->applyTo($resultObject);
127 $this->assertTrue($transformedObject->isError());
132 $resultObject =
new Result\Ok(
'hello');
134 $transformedObject = $this->transformation->applyTo($resultObject);
136 $this->assertTrue($transformedObject->isError());
141 $resultObject =
new Result\Ok(200);
143 $transformedObject = $this->transformation->applyTo($resultObject);
145 $this->assertTrue($transformedObject->isError());
150 $resultObject =
new Result\Ok(10.5);
152 $transformedObject = $this->transformation->applyTo($resultObject);
154 $this->assertEquals(10.5, $transformedObject->value());
159 $resultObject =
new Result\Ok(
true);
161 $transformedObject = $this->transformation->applyTo($resultObject);
163 $this->assertTrue($transformedObject->isError());
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...