diff --git a/tests/framework/rest/SerializerTest.php b/tests/framework/rest/SerializerTest.php index e057a1446b4..07ca6c4f7f0 100644 --- a/tests/framework/rest/SerializerTest.php +++ b/tests/framework/rest/SerializerTest.php @@ -402,6 +402,11 @@ public function dataProviderSerializeDataProvider() ]; } + public function dataProviderHeadSerializeDataProvider() + { + return $this->dataProviderSerializeDataProvider(); + } + /** * @dataProvider dataProviderSerializeDataProvider * @@ -415,7 +420,17 @@ public function testSerializeDataProvider($dataProvider, $expectedResult, $saveK $serializer->preserveKeys = $saveKeys; $this->assertEquals($expectedResult, $serializer->serialize($dataProvider)); + } + /** + * @dataProvider dataProviderHeadSerializeDataProvider + * + * @param \yii\data\DataProviderInterface $dataProvider + * @param array $expectedResult + * @param bool $saveKeys + */ + public function testHeadSerializeDataProvider($dataProvider, $expectedResult, $saveKeys = false) + { $serializer = new Serializer(); $serializer->preserveKeys = $saveKeys; $serializer->collectionEnvelope = 'data';