diff --git a/tests/framework/rest/SerializerTest.php b/tests/framework/rest/SerializerTest.php index 48627eeeca8..e057a1446b4 100644 --- a/tests/framework/rest/SerializerTest.php +++ b/tests/framework/rest/SerializerTest.php @@ -416,6 +416,12 @@ public function testSerializeDataProvider($dataProvider, $expectedResult, $saveK $this->assertEquals($expectedResult, $serializer->serialize($dataProvider)); + $serializer = new Serializer(); + $serializer->preserveKeys = $saveKeys; + $serializer->collectionEnvelope = 'data'; + + $this->assertEquals($expectedResult, $serializer->serialize($dataProvider)['data']); + $_SERVER['REQUEST_METHOD'] = 'HEAD'; $request = new Request(); $_POST[$request->methodParam] = 'HEAD';