Skip to content

Commit eb5a14b

Browse files
committed
Add test for concat() after map()
1 parent 7d5cd56 commit eb5a14b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/test/php/util/data/unittest/SequenceCreationTest.class.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,14 @@ public function concat() {
8282
);
8383
}
8484

85+
#[Test]
86+
public function concat_after_mapping() {
87+
$this->assertSequence(
88+
[2, 4, 6, 'EOF'],
89+
Sequence::of([1, 2, 3])->map(fn($e) => $e * 2)->concat(['EOF'])
90+
);
91+
}
92+
8593
#[Test, Expect(IllegalArgumentException::class)]
8694
public function cannot_concat_non_enumerable() {
8795
Sequence::$EMPTY->concat('test');

0 commit comments

Comments
 (0)