Skip to content

Commit

Permalink
Add test for CuyZ#337
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Feb 27, 2023
1 parent 4eb944b commit cc7c1a2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/Integration/Mapping/Object/ArrayValuesMappingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,17 @@ public function test_values_are_mapped_properly(): void
}
}

public function test_key_is_class_name(): void
{
try {
$result = (new MapperBuilder())->mapper()->map('array{ArrayObject: "ArrayObject"}', ['ArrayObject' => 'test']);
} catch (MappingError $error) {
$this->mappingFail($error);
}

self::assertSame(['ArrayObject' => 'ArrayObject'], $result);
}

public function test_empty_array_in_non_empty_array_throws_exception(): void
{
try {
Expand Down

0 comments on commit cc7c1a2

Please sign in to comment.