19 require_once(
'./libs/composer/vendor/autoload.php');
33 $result = $parallel->transform(
'hello');
35 $this->assertEquals(array(
'hello',
'hello'),
$result);
48 $result = $parallel->applyTo(
new Ok(
'hello'));
50 $this->assertEquals(array(
'hello',
'hello'),
$result->value());
55 $this->expectNotToPerformAssertions();
59 $result = $parallel->transform(42.0);
79 $this->assertTrue(
$result->isError());
84 $this->expectNotToPerformAssertions();
A result encapsulates a value or an error and simplifies the handling of those.