10 require_once(
'./libs/composer/vendor/autoload.php');
31 $this->expectNotToPerformAssertions();
34 $transformedValue = $this->transformation->transform(200);
44 $this->expectNotToPerformAssertions();
47 $transformedValue = $this->transformation->transform(
'hello');
57 $transformedValue = $this->transformation->transform(10.5);
59 $this->assertEquals(10.5, $transformedValue);
64 $this->expectNotToPerformAssertions();
67 $transformedValue = $this->transformation->transform(-200);
77 $this->expectNotToPerformAssertions();
80 $transformedValue = $this->transformation->transform(0);
90 $transformedValue = $this->transformation->transform(0.0);
92 $this->assertEquals(0.0, $transformedValue);
97 $resultObject =
new Result\Ok(200);
99 $transformedObject = $this->transformation->applyTo($resultObject);
101 $this->assertTrue($transformedObject->isError());
106 $resultObject =
new Result\Ok(-200);
108 $transformedObject = $this->transformation->applyTo($resultObject);
110 $this->assertTrue($transformedObject->isError());
115 $resultObject =
new Result\Ok(0);
117 $transformedObject = $this->transformation->applyTo($resultObject);
119 $this->assertTrue($transformedObject->isError());
124 $resultObject =
new Result\Ok(
'hello');
126 $transformedObject = $this->transformation->applyTo($resultObject);
128 $this->assertTrue($transformedObject->isError());
133 $resultObject =
new Result\Ok(200);
135 $transformedObject = $this->transformation->applyTo($resultObject);
137 $this->assertTrue($transformedObject->isError());
142 $resultObject =
new Result\Ok(10.5);
144 $transformedObject = $this->transformation->applyTo($resultObject);
146 $this->assertEquals(10.5, $transformedObject->value());
151 $resultObject =
new Result\Ok(
true);
153 $transformedObject = $this->transformation->applyTo($resultObject);
155 $this->assertTrue($transformedObject->isError());