Skip to content

Commit 345a0c5

Browse files
committed
Better squashing.
1 parent 0d7f732 commit 345a0c5

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tests/OptionalTest.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,27 @@ public function itHandlesValueCallbacks()
9090
);
9191
});
9292
}
93+
94+
/**
95+
* @test
96+
*
97+
* @return void
98+
*/
99+
public function itSquashesNestedOptionals()
100+
{
101+
$optional = new Optional(
102+
new Optional(
103+
new Optional(
104+
new Optional(
105+
"hello world"
106+
)
107+
)
108+
)
109+
);
110+
111+
$this->assertEquals(
112+
"hello world",
113+
$optional->value()
114+
);
115+
}
93116
}

0 commit comments

Comments
 (0)