3 declare(strict_types=1);
42 $result = $transformation->transform([1, 2]);
44 $this->assertEquals([1, 2], $result);
49 $this->expectNotToPerformAssertions();
56 $result = $transformation->transform([1, 2]);
66 $this->expectNotToPerformAssertions();
73 $result = $transformation->transform([1, 2]);
84 $this->expectNotToPerformAssertions();
91 $result = $transformation->transform([1, 2, 3]);
104 $result = $transformation->applyTo(
new Result\
Ok([1, 2]));
106 $this->assertEquals([1, 2], $result->value());
115 $result = $transformation->applyTo(
new Result\
Ok([1, 2]));
117 $this->assertTrue($result->isError());
126 $result = $transformation->applyTo(
new Result\
Ok([1, 2, 3]));
128 $this->assertTrue($result->isError());
133 $this->expectNotToPerformAssertions();
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
A result encapsulates a value or an error and simplifies the handling of those.
A result encapsulates a value or an error and simplifies the handling of those.