protected $defaultTheme = 'stark';
/**
* A node type without moderation state disabled.
*
* @covers \Drupal\content_moderation\EntityTypeInfo::formAlter
* @covers \Drupal\content_moderation\Entity\Handler\NodeModerationHandler::enforceRevisionsBundleFormAlter
*/
public function testNotModerated() { $this->
drupalLogin($this->adminUser
);
$this->
createContentTypeFromUi('Not moderated', 'not_moderated'
);
$this->
assertSession()->
pageTextContains('The content type Not moderated has been added.'
);
$this->
grantUserPermissionToCreateContentOfType($this->adminUser, 'not_moderated'
);
$this->
drupalGet('node/add/not_moderated'
);
$this->
assertSession()->
pageTextContains('Save'
);
$this->
submitForm([ 'title[0][value]' => 'Test',
], 'Save'
);
$this->
assertSession()->
pageTextContains('Not moderated Test has been created.'
);
} /**
* Tests enabling moderation on an existing node-type, with content.
*
* @covers \Drupal\content_moderation\EntityTypeInfo::formAlter
* @covers \Drupal\content_moderation\Entity\Handler\NodeModerationHandler::enforceRevisionsBundleFormAlter
*/