From 04df26a7eed9195f8cf896c516c910e4fc89274b Mon Sep 17 00:00:00 2001 From: Pablo Largo Mohedano Date: Tue, 12 Dec 2023 16:22:53 +0100 Subject: [PATCH] Verify in unit test that a `None` option remains the same after calling `apply` --- tests/unit/Option/NoneTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/Option/NoneTest.php b/tests/unit/Option/NoneTest.php index 85aa8f7e..42e23b92 100644 --- a/tests/unit/Option/NoneTest.php +++ b/tests/unit/Option/NoneTest.php @@ -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