Skip to content

Commit

Permalink
Verify in unit test that a None option remains the same after calli…
Browse files Browse the repository at this point in the history
…ng `apply`
  • Loading branch information
devnix committed Dec 28, 2023
1 parent 7161d6d commit 04df26a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unit/Option/NoneTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ public function testApply(): void
$spy = new Ref(1);

$option = Option\none();
$option->apply(static function (int $value) use ($spy) {
$actual = $option->apply(static function (int $value) use ($spy) {
$spy->value += $value;
});

static::assertSame(1, $spy->value);
static::assertTrue($option->isNone());
static::assertSame($option, $actual);
}

public function testMap(): void
Expand Down

0 comments on commit 04df26a

Please sign in to comment.