function FileUploadResourceTestBase::getNormalizedPostEntity
Returns the normalized POST entity referencing the uploaded file.
Return value
array
See also
::testPostFileUpload()
\Drupal\Tests\rest\Functional\EntityResource\EntityTest\EntityTestResourceTestBase::getNormalizedPostEntity()
2 calls to FileUploadResourceTestBase::getNormalizedPostEntity()
- FileUploadHalJsonTestBase::getNormalizedPostEntity in core/modules/ hal/ tests/ src/ Functional/ file/ FileUploadHalJsonTestBase.php 
- FileUploadResourceTestBase::testPostFileUpload in core/modules/ rest/ tests/ src/ Functional/ FileUploadResourceTestBase.php 
- Tests using the file upload POST route.
1 method overrides FileUploadResourceTestBase::getNormalizedPostEntity()
- FileUploadHalJsonTestBase::getNormalizedPostEntity in core/modules/ hal/ tests/ src/ Functional/ file/ FileUploadHalJsonTestBase.php 
File
- 
              core/modules/ rest/ tests/ src/ Functional/ FileUploadResourceTestBase.php, line 231 
Class
- FileUploadResourceTestBase
- Tests binary data file upload route.
Namespace
Drupal\Tests\rest\FunctionalCode
protected function getNormalizedPostEntity() {
  return [
    'type' => [
      [
        'value' => 'entity_test',
      ],
    ],
    'name' => [
      [
        'value' => 'Dramallama',
      ],
    ],
    'field_rest_file_test' => [
      [
        'target_id' => 1,
        'description' => 'The most fascinating file ever!',
      ],
    ],
  ];
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
