/** * @test * @since 3.4.2 */ public function lastErrorMessageShouldBeNullByDefault() { assert(lastErrorMessage(), equals(Result::of(null))); }
/** * @param mixed $value * @test * @dataProvider nonEmptyValues * @since 6.2.0 */ public function applyWhenEmptyOnResultOfNonEmptyReturnsValue($value) { assert(Result::of($value)->applyWhenEmpty(function () { return 909; })->value(), equals($value)); }