3 namespace Drupal\Tests\content_moderation\Kernel;
5 use Drupal\Component\Plugin\Exception\PluginNotFoundException;
6 use Drupal\KernelTests\KernelTestBase;
7 use Drupal\rest\Entity\RestResourceConfig;
8 use Drupal\rest\RestResourceConfigInterface;
11 * @group content_moderation
13 class ContentModerationStateResourceTest extends KernelTestBase {
18 public static $modules = ['serialization', 'rest', 'content_moderation'];
21 * @see content_moderation_rest_resource_alter()
23 public function testCreateContentModerationStateResource() {
24 $this->setExpectedException(PluginNotFoundException::class, 'The "entity:content_moderation_state" plugin does not exist.');
25 RestResourceConfig::create([
26 'id' => 'entity.content_moderation_state',
27 'granularity' => RestResourceConfigInterface::RESOURCE_GRANULARITY,
30 'formats' => ['json'],
31 'authentication' => ['cookie'],