diff --git a/core/modules/media/tests/src/Kernel/MediaResourceTest.php b/core/modules/media/tests/src/Kernel/MediaResourceTest.php new file mode 100644 index 0000000..0623257 --- /dev/null +++ b/core/modules/media/tests/src/Kernel/MediaResourceTest.php @@ -0,0 +1,47 @@ +setExpectedException(PluginNotFoundException::class, 'The "entity:' . $entity_type_id . '" plugin does not exist.'); + RestResourceConfig::create([ + 'id' => 'entity.' . $entity_type_id, + 'granularity' => RestResourceConfigInterface::RESOURCE_GRANULARITY, + 'configuration' => [ + 'methods' => ['GET'], + 'formats' => ['json'], + 'authentication' => ['cookie'], + ], + ]) + ->enable() + ->save(); + } + + public function providerTestEnableMediaEntityType() { + return [ + ['media'], + ['media_type'], + ]; + } + +}