diff --git a/tests/Integration/Normalizer/NormalizerTest.php b/tests/Integration/Normalizer/NormalizerTest.php index e761ce2d..8a884c25 100644 --- a/tests/Integration/Normalizer/NormalizerTest.php +++ b/tests/Integration/Normalizer/NormalizerTest.php @@ -210,6 +210,21 @@ public static function normalize_basic_values_yields_expected_output_data_provid JSON_FORCE_OBJECT ]; + yield 'list' => [ + 'input' => ['foo', 'bar'], + 'expected array' => ['foo', 'bar'], + 'expected json' => '["foo","bar"]', + ]; + + yield 'list kept as object in json' => [ + 'input' => ['foo', 'bar'], + 'expected array' => ['foo', 'bar'], + 'expected json' => '{"0":"foo","1":"bar"}', + [], + [], + JSON_FORCE_OBJECT + ]; + yield 'ArrayObject' => [ 'input' => new ArrayObject(['foo' => 'foo', 'bar' => 'bar']), 'expected array' => [