Skip to content

Commit

Permalink
core: add collectionEnvelope unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Akbar Herlambang committed Oct 18, 2023
1 parent b469764 commit 344b0ae
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/framework/rest/SerializerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 344b0ae

Please sign in to comment.