diff --git a/fuw/app/frontend/controllers/UploadController.php b/fuw/app/frontend/controllers/UploadController.php index 05f348d511..14b55f6a9c 100644 --- a/fuw/app/frontend/controllers/UploadController.php +++ b/fuw/app/frontend/controllers/UploadController.php @@ -16,10 +16,6 @@ class UploadController extends ActiveController { public $modelClass = 'common\models\Upload'; - public $serializer = [ - 'class' => 'yii\rest\Serializer', - 'collectionEnvelope' => 'uploads', - ]; /** * @inheritdoc diff --git a/fuw/app/frontend/tests/functional/UploadCest.php b/fuw/app/frontend/tests/functional/UploadCest.php index 79716ae2f9..5e37dd0a91 100644 --- a/fuw/app/frontend/tests/functional/UploadCest.php +++ b/fuw/app/frontend/tests/functional/UploadCest.php @@ -46,8 +46,8 @@ public function getUpload(FunctionalTester $I) $I->seeResponseIsJson(); $I->seeResponseContainsJson(array('doi' => "$doi")); $I->dontSeeResponseContainsJson(array('doi' => "010020")); - $I->seeResponseJsonMatchesJsonPath('$.uploads[0].name'); - $I->seeResponseJsonMatchesJsonPath('$.uploads[1].name'); - $I->dontSeeResponseJsonMatchesJsonPath('$.uploads[2].name'); + $I->seeResponseJsonMatchesJsonPath('$.[0].name'); + $I->seeResponseJsonMatchesJsonPath('$.[1].name'); + $I->dontSeeResponseJsonMatchesJsonPath('$.[2].name'); } }