You are here

protected function ResponsiveImageStyleResourceTestBase::getExpectedUnauthorizedAccessMessage in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleResourceTestBase.php \Drupal\Tests\responsive_image\Functional\Rest\ResponsiveImageStyleResourceTestBase::getExpectedUnauthorizedAccessMessage()
  2. 10 core/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleResourceTestBase.php \Drupal\Tests\responsive_image\Functional\Rest\ResponsiveImageStyleResourceTestBase::getExpectedUnauthorizedAccessMessage()

Return the expected error message.

Parameters

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

Return value

string The error string.

Overrides EntityResourceTestBase::getExpectedUnauthorizedAccessMessage

File

core/modules/responsive_image/tests/src/Functional/Rest/ResponsiveImageStyleResourceTestBase.php, line 125

Class

ResponsiveImageStyleResourceTestBase
ResourceTestBase for ResponsiveImageStyle entity.

Namespace

Drupal\Tests\responsive_image\Functional\Rest

Code

protected function getExpectedUnauthorizedAccessMessage($method) {
  if ($this
    ->config('rest.settings')
    ->get('bc_entity_resource_permissions')) {
    return parent::getExpectedUnauthorizedAccessMessage($method);
  }
  return "The 'administer responsive images' permission is required.";
}