You are here

protected function RevisionIsCurrentTest::createTranslatableNodeTypeWithWorkflow in Acquia Content Hub 8.2

Creates a translatable node type with a revisionable workflow.

Throws

\Drupal\Core\Entity\EntityStorageException

1 call to RevisionIsCurrentTest::createTranslatableNodeTypeWithWorkflow()
RevisionIsCurrentTest::setUp in tests/src/Kernel/RevisionIsCurrentTest.php

File

tests/src/Kernel/RevisionIsCurrentTest.php, line 67

Class

RevisionIsCurrentTest
Tests that only current published revisions are enqueued.

Namespace

Drupal\Tests\acquia_contenthub\Kernel

Code

protected function createTranslatableNodeTypeWithWorkflow() {
  NodeType::create([
    'type' => 'bundle_test',
    'new_revision' => TRUE,
  ])
    ->save();
  $workflow = $this
    ->createEditorialWorkflow();
  $workflow
    ->getTypePlugin()
    ->addEntityTypeAndBundle('node', 'bundle_test');
  $workflow
    ->save();
  $this->contentTranslationManager
    ->setEnabled('node', 'bundle_test', TRUE);
}