diff -u b/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeJsonCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeJsonCookieTest.php --- b/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeJsonCookieTest.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeJsonCookieTest.php @@ -7,7 +7,7 @@ /** * @group rest */ -class BlockJsonCookieTest extends BlockContentTypeResourceTestBase { +class BlockContentTypeJsonCookieTest extends BlockContentTypeResourceTestBase { use CookieResourceTestTrait; diff -u b/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeResourceTestBase.php --- b/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeResourceTestBase.php @@ -17,7 +17,6 @@ * {@inheritdoc} */ public static $modules = [ - 'block', 'block_content' ]; @@ -26,6 +25,10 @@ */ protected static $entityTypeId = 'block_content_type'; + + /** + * @var \Drupal\block_content\BlockContentTypeInterface + */ protected $entity; /** @@ -48,7 +51,7 @@ $block_content_type->save(); - $this->uuid = $block_content_type->uuid(); + $this->entity->uuid = $block_content_type->uuid(); return $block_content_type; } @@ -65,7 +68,7 @@ 'langcode' => 'en', 'revision' => 0, 'status' => TRUE, - 'uuid' => $this->uuid, + 'uuid' => $this->entity->uuid, ]; } @@ -77,28 +80,2 @@ } - - /** - * {@inheritdoc} - */ - protected function getExpectedCacheContexts() { - return [ - 'url.site', - 'user.permissions', - ]; - } - - /** - * {@inheritdoc} - */ - protected function getExpectedUnauthorizedAccessMessage($method) { - if ($this->config('rest.settings')->get('bc_entity_resource_permissions')) { - return parent::getExpectedUnauthorizedAccessMessage($method); - } - switch ($method) { - case 'GET': - return "The 'administer blocks' permission is required."; - - default: - return parent::getExpectedUnauthorizedAccessMessage($method); - } - } }