function FileUploadTest::setUpAuthorization
Same name in other branches
- 9 core/modules/jsonapi/tests/src/Functional/FileUploadTest.php \Drupal\Tests\jsonapi\Functional\FileUploadTest::setUpAuthorization()
- 8.9.x core/modules/jsonapi/tests/src/Functional/FileUploadTest.php \Drupal\Tests\jsonapi\Functional\FileUploadTest::setUpAuthorization()
- 10 core/modules/jsonapi/tests/src/Functional/FileUploadTest.php \Drupal\Tests\jsonapi\Functional\FileUploadTest::setUpAuthorization()
Overrides ResourceTestBase::setUpAuthorization
8 calls to FileUploadTest::setUpAuthorization()
- FileUploadTest::testFileUploadNoConfiguration in core/
modules/ jsonapi/ tests/ src/ Functional/ FileUploadTest.php - Tests using the file upload POST route no configuration.
- FileUploadTest::testFileUploadStrippedFilePath in core/
modules/ jsonapi/ tests/ src/ Functional/ FileUploadTest.php - Tests using the file upload route with any path prefixes being stripped.
- FileUploadTest::testFileUploadUnicodeFilename in core/
modules/ jsonapi/ tests/ src/ Functional/ FileUploadTest.php - Tests using the file upload route with a unicode file name.
- FileUploadTest::testFileUploadZeroByteFile in core/
modules/ jsonapi/ tests/ src/ Functional/ FileUploadTest.php - Tests using the file upload route with a zero byte file.
- FileUploadTest::testInvalidFileUploads in core/
modules/ jsonapi/ tests/ src/ Functional/ FileUploadTest.php - Tests invalid file uploads.
File
-
core/
modules/ jsonapi/ tests/ src/ Functional/ FileUploadTest.php, line 849
Class
- FileUploadTest
- Tests binary data file upload route.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
protected function setUpAuthorization($method) : void {
switch ($method) {
case 'GET':
$this->grantPermissionsToTestedRole([
'view test entity',
]);
break;
case 'POST':
$this->grantPermissionsToTestedRole([
'create entity_test entity_test_with_bundle entities',
'access content',
]);
break;
case 'PATCH':
$this->grantPermissionsToTestedRole([
'administer entity_test content',
'access content',
]);
break;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.