10 require_once(
'./libs/composer/vendor/autoload.php');
31 $transformedValue = $this->transformation->transform(
'hello');
33 $this->assertEquals(
'hello', $transformedValue);
38 $this->expectNotToPerformAssertions();
41 $transformedValue = $this->transformation->transform(200);
51 $this->expectNotToPerformAssertions();
54 $transformedValue = $this->transformation->transform(-200);
59 $this->assertEquals(
'-200', $transformedValue);
64 $this->expectNotToPerformAssertions();
67 $transformedValue = $this->transformation->transform(0);
77 $this->expectNotToPerformAssertions();
79 $this->expectNotToPerformAssertions();
82 $transformedValue = $this->transformation->transform(10.5);
92 $this->expectNotToPerformAssertions();
95 $transformedValue = $this->transformation->transform(
true);
105 $this->expectNotToPerformAssertions();
108 $transformedValue = $this->transformation->transform(
false);
118 $resultObject =
new Result\Ok(
'hello');
120 $transformedObject = $this->transformation->applyTo($resultObject);
122 $this->assertEquals(
'hello', $transformedObject->value());
127 $resultObject =
new Result\Ok(200);
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(0);
147 $transformedObject = $this->transformation->applyTo($resultObject);
149 $this->assertTrue($transformedObject->isError());
154 $resultObject =
new Result\Ok(10.5);
156 $transformedObject = $this->transformation->applyTo($resultObject);
158 $this->assertTrue($transformedObject->isError());
163 $resultObject =
new Result\Ok(
true);
165 $transformedObject = $this->transformation->applyTo($resultObject);
167 $this->assertTrue($transformedObject->isError());