protected function FileUploadResourceTestBase::getNormalizedPostEntity in Drupal 9
Same name and namespace in other branches
- 8 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()
2 calls to FileUploadResourceTestBase::getNormalizedPostEntity()
- FileUploadHalJsonTestBase::getNormalizedPostEntity in core/
modules/ file/ tests/ src/ Functional/ Hal/ 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/ file/ tests/ src/ Functional/ Hal/ FileUploadHalJsonTestBase.php
File
- core/
modules/ rest/ tests/ src/ Functional/ FileUploadResourceTestBase.php, line 230
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!',
],
],
];
}