10 require_once(
'./libs/composer/vendor/autoload.php');
31 $this->expectNotToPerformAssertions();
34 $transformedValue = $this->transformation->transform(200);
43 $this->expectNotToPerformAssertions();
46 $transformedValue = $this->transformation->transform(-200);
55 $this->expectNotToPerformAssertions();
58 $transformedValue = $this->transformation->transform(0);
67 $this->expectNotToPerformAssertions();
70 $transformedValue = $this->transformation->transform(
'hello');
79 $this->expectNotToPerformAssertions();
82 $transformedValue = $this->transformation->transform(10.5);
91 $this->expectNotToPerformAssertions();
94 $transformedValue = $this->transformation->transform(-10.5);
103 $this->expectNotToPerformAssertions();
106 $transformedValue = $this->transformation->transform(0.0);
115 $transformedValue = $this->transformation->transform(
true);
116 $this->assertTrue($transformedValue);
121 $transformedValue = $this->transformation->transform(
false);
122 $this->assertFalse($transformedValue);
127 $resultObject =
new Result\Ok(
'hello');
129 $transformedObject = $this->transformation->applyTo($resultObject);
131 $this->assertTrue($transformedObject->isError());
136 $resultObject =
new Result\Ok(200);
138 $transformedObject = $this->transformation->applyTo($resultObject);
140 $this->assertTrue($transformedObject->isError());
145 $resultObject =
new Result\Ok(-200);
147 $transformedObject = $this->transformation->applyTo($resultObject);
149 $this->assertTrue($transformedObject->isError());
154 $resultObject =
new Result\Ok(0);
156 $transformedObject = $this->transformation->applyTo($resultObject);
158 $this->assertTrue($transformedObject->isError());
163 $resultObject =
new Result\Ok(10.5);
165 $transformedObject = $this->transformation->applyTo($resultObject);
167 $this->assertTrue($transformedObject->isError());
172 $resultObject =
new Result\Ok(
true);
174 $transformedObject = $this->transformation->applyTo($resultObject);
176 $this->assertTrue($transformedObject->value());