You are here

protected function FileUploadResourceTestBase::getExpectedUnauthorizedAccessMessage in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/rest/tests/src/Functional/FileUploadResourceTestBase.php \Drupal\Tests\rest\Functional\FileUploadResourceTestBase::getExpectedUnauthorizedAccessMessage()

Return the expected error message.

Parameters

string $method: The HTTP method (GET, POST, PATCH, DELETE).

Return value

string The error string.

Overrides ResourceTestBase::getExpectedUnauthorizedAccessMessage

1 call to FileUploadResourceTestBase::getExpectedUnauthorizedAccessMessage()
FileUploadResourceTestBase::testPostFileUpload in core/modules/rest/tests/src/Functional/FileUploadResourceTestBase.php
Tests using the file upload POST route.

File

core/modules/rest/tests/src/Functional/FileUploadResourceTestBase.php, line 661

Class

FileUploadResourceTestBase
Tests binary data file upload route.

Namespace

Drupal\Tests\rest\Functional

Code

protected function getExpectedUnauthorizedAccessMessage($method) {
  return "The following permissions are required: 'administer entity_test content' OR 'administer entity_test_with_bundle content' OR 'create entity_test entity_test_with_bundle entities'.";
}