3 namespace Drupal\Tests\block_content\Functional\Rest;
5 use Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase;
6 use Drupal\block_content\Entity\BlockContentType;
8 abstract class BlockContentTypeResourceTestBase extends EntityResourceTestBase {
13 public static $modules = ['block_content'];
18 protected static $entityTypeId = 'block_content_type';
21 * @var \Drupal\block_content\Entity\BlockContentTypeInterface
28 protected function setUpAuthorization($method) {
29 $this->grantPermissionsToTestedRole(['administer blocks']);
35 protected function createEntity() {
36 $block_content_type = BlockContentType::create([
40 'description' => 'Provides a competitive alternative to the "basic" type',
43 $block_content_type->save();
45 return $block_content_type;
51 protected function getExpectedNormalizedEntity() {
54 'description' => 'Provides a competitive alternative to the "basic" type',
60 'uuid' => $this->entity->uuid(),
67 protected function getNormalizedPostEntity() {
68 // @todo Update in https://www.drupal.org/node/2300677.