function ModerationStateNodeTypeTest::testEnforceRevisionsEntityFormAlter
Same name in other branches
- 8.9.x core/modules/content_moderation/tests/src/Functional/ModerationStateNodeTypeTest.php \Drupal\Tests\content_moderation\Functional\ModerationStateNodeTypeTest::testEnforceRevisionsEntityFormAlter()
- 10 core/modules/content_moderation/tests/src/Functional/ModerationStateNodeTypeTest.php \Drupal\Tests\content_moderation\Functional\ModerationStateNodeTypeTest::testEnforceRevisionsEntityFormAlter()
- 11.x 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]');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.