Skip to content

Commit

Permalink
tests: TypedIterator - Add test.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Jan 15, 2022
1 parent cbc6c20 commit b9aab65
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/unit/Iterator/TypedIteratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ final class TypedIteratorTest extends TestCase

private const MAP_DATA = ['foo' => 1, 'bar' => 2];

public function testWithNullValues(): void
{
$data = ['a' => null, 'b' => null];

$iterator = new TypedIterator(new ArrayIterator($data));

self::assertIdenticalIterable(
$data,
$iterator
);
}

public function testAllowsArrayOfAnyType(): void
{
$data = [self::MAP_DATA, self::LIST_DATA];
Expand Down

0 comments on commit b9aab65

Please sign in to comment.