namespace Drupal\Tests\content_moderation\Functional;
use Drupal\Core\Session\AccountInterface;
+use Drupal\node\Entity\NodeType;
use Drupal\Tests\BrowserTestBase;
+use Drupal\Tests\content_moderation\Traits\ContentModerationTestTrait;
use Drupal\user\Entity\Role;
/**
*/
abstract class ModerationStateTestBase extends BrowserTestBase {
+ use ContentModerationTestTrait;
+
/**
* Profile to use.
*
'use editorial transition archived_published',
];
+ /**
+ * The editorial workflow entity.
+ *
+ * @var \Drupal\workflows\Entity\Workflow
+ */
+ protected $workflow;
+
/**
* Modules to enable.
*
*/
protected function setUp() {
parent::setUp();
+ $this->workflow = $this->createEditorialWorkflow();
$this->adminUser = $this->drupalCreateUser($this->permissions);
$this->drupalPlaceBlock('local_tasks_block', ['id' => 'tabs_block']);
$this->drupalPlaceBlock('page_title_block');
];
$this->drupalPostForm(NULL, $edit, t('Save content type'));
+ // Check the content type has been set to create new revisions.
+ $this->assertTrue(NodeType::load($content_type_id)->isNewRevision());
+
if ($moderated) {
$this->enableModerationThroughUi($content_type_id, $workflow_id);
}