protected function FileUploadResourceTestBase::getNormalizedPostEntity in Drupal 10
Same name and namespace in other branches
- 8 core/modules/rest/tests/src/Functional/FileUploadResourceTestBase.php \Drupal\Tests\rest\Functional\FileUploadResourceTestBase::getNormalizedPostEntity()
- 9 core/modules/rest/tests/src/Functional/FileUploadResourceTestBase.php \Drupal\Tests\rest\Functional\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()
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!',
],
],
];
}