X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fblock_content%2Ftests%2Fsrc%2FFunctional%2FRest%2FBlockContentTypeResourceTestBase.php;fp=web%2Fcore%2Fmodules%2Fblock_content%2Ftests%2Fsrc%2FFunctional%2FRest%2FBlockContentTypeResourceTestBase.php;h=13d6ed2d00d7f36aa2517e31c8549632b208618c;hp=0000000000000000000000000000000000000000;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/modules/block_content/tests/src/Functional/Rest/BlockContentTypeResourceTestBase.php b/web/core/modules/block_content/tests/src/Functional/Rest/BlockContentTypeResourceTestBase.php new file mode 100644 index 000000000..13d6ed2d0 --- /dev/null +++ b/web/core/modules/block_content/tests/src/Functional/Rest/BlockContentTypeResourceTestBase.php @@ -0,0 +1,71 @@ +grantPermissionsToTestedRole(['administer blocks']); + } + + /** + * {@inheritdoc} + */ + protected function createEntity() { + $block_content_type = BlockContentType::create([ + 'id' => 'pascal', + 'label' => 'Pascal', + 'revision' => FALSE, + 'description' => 'Provides a competitive alternative to the "basic" type', + ]); + + $block_content_type->save(); + + return $block_content_type; + } + + /** + * {@inheritdoc} + */ + protected function getExpectedNormalizedEntity() { + return [ + 'dependencies' => [], + 'description' => 'Provides a competitive alternative to the "basic" type', + 'id' => 'pascal', + 'label' => 'Pascal', + 'langcode' => 'en', + 'revision' => 0, + 'status' => TRUE, + 'uuid' => $this->entity->uuid(), + ]; + } + + /** + * {@inheritdoc} + */ + protected function getNormalizedPostEntity() { + // @todo Update in https://www.drupal.org/node/2300677. + } + +}