diff --git a/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeJsonCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeJsonCookieTest.php index 7fe32b8..653d5c0 100644 --- a/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 --git a/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeResourceTestBase.php index c2dc1f6..760263b 100644 --- a/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeResourceTestBase.php @@ -8,24 +8,18 @@ abstract class BlockContentTypeResourceTestBase extends EntityResourceTestBase { /** - * @var string - * Provides a place to store the system-generated UUID - */ - public $uuid; - - /** * {@inheritdoc} */ - public static $modules = [ - 'block', - 'block_content' - ]; + public static $modules = ['block_content']; /** * {@inheritdoc} */ protected static $entityTypeId = 'block_content_type'; + /** + * @var \Drupal\block_content\Entity\BlockContentType + */ protected $entity; /** @@ -48,8 +42,6 @@ protected function createEntity() { $block_content_type->save(); - $this->uuid = $block_content_type->uuid(); - return $block_content_type; } @@ -65,7 +57,7 @@ protected function getExpectedNormalizedEntity() { 'langcode' => 'en', 'revision' => 0, 'status' => TRUE, - 'uuid' => $this->uuid, + 'uuid' => $this->entity->uuid(), ]; } @@ -75,30 +67,4 @@ protected function getExpectedNormalizedEntity() { protected function getNormalizedPostEntity() { // @todo Update in https://www.drupal.org/node/2300677. } - - /** - * {@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); - } - } }