3 namespace Drupal\Tests\rest\Functional\EntityResource\RestResourceConfig;
5 use Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase;
6 use Drupal\rest\Entity\RestResourceConfig;
8 abstract class RestResourceConfigResourceTestBase extends EntityResourceTestBase {
13 public static $modules = ['dblog'];
18 protected static $entityTypeId = 'rest_resource_config';
21 * @var \Drupal\rest\RestResourceConfigInterface
28 protected function setUpAuthorization($method) {
29 $this->grantPermissionsToTestedRole(['administer rest resources']);
35 protected function createEntity() {
36 $rest_resource_config = RestResourceConfig::create([
38 'plugin_id' => 'dblog',
39 'granularity' => 'method',
42 'supported_formats' => [
51 $rest_resource_config->save();
53 return $rest_resource_config;
59 protected function getExpectedNormalizedEntity() {
61 'uuid' => $this->entity->uuid(),
72 'plugin_id' => 'dblog',
73 'granularity' => 'method',
76 'supported_formats' => [
90 protected function getNormalizedPostEntity() {
91 // @todo Update in https://www.drupal.org/node/2300677.
97 protected function getExpectedCacheContexts() {