Skip to content

Commit

Permalink
tests(serializer): Add bad cases
Browse files Browse the repository at this point in the history
  • Loading branch information
zlodes committed Jun 18, 2023
1 parent c5c2765 commit fdf7c10
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/KeySerialization/JsonSerializerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,21 @@ public static function unserializationErrorsDataProvider(): iterable
'',
'Expected a non-empty value',
];

yield 'malformed labels' => [
'foo|false',
'Expected an array. Got: boolean',
];

yield 'empty label' => [
'foo|{"bar":""}',
'Expected a different value than ""',
];

yield 'malformed json' => [
'foo|{"bar":"baz}',
'Control character error, possibly incorrectly encoded',
];
}

public static function serializeDataProvider(): iterable
Expand Down

0 comments on commit fdf7c10

Please sign in to comment.