public function ModerationStateNodeTypeTest::testEnforceRevisionsEntityFormAlter in Drupal 9
Same name and namespace in other branches
- 8 core/modules/content_moderation/tests/src/Functional/ModerationStateNodeTypeTest.php \Drupal\Tests\content_moderation\Functional\ModerationStateNodeTypeTest::testEnforceRevisionsEntityFormAlter()
@covers \Drupal\content_moderation\Entity\Handler\NodeModerationHandler::enforceRevisionsBundleFormAlter
File
- core/
modules/ content_moderation/ tests/ src/ Functional/ ModerationStateNodeTypeTest.php, line 108
Class
- ModerationStateNodeTypeTest
- Tests moderation state node type integration.
Namespace
Drupal\Tests\content_moderation\FunctionalCode
public function testEnforceRevisionsEntityFormAlter() {
$this
->drupalLogin($this->adminUser);
$this
->createContentTypeFromUi('Moderated', 'moderated');
// Ensure checkboxes in the 'workflow' section can be altered, even when
// 'revision' is enforced and disabled.
$this
->drupalGet('admin/structure/types/manage/moderated');
$this
->submitForm([
'options[promote]' => TRUE,
], 'Save content type');
$this
->drupalGet('admin/structure/types/manage/moderated');
$this
->assertSession()
->checkboxChecked('options[promote]');
}