public function DefaultModerationStateTest::testDeleteDefaultStateAccess in Drupal 8
Same name and namespace in other branches
- 9 core/modules/content_moderation/tests/src/Functional/DefaultModerationStateTest.php \Drupal\Tests\content_moderation\Functional\DefaultModerationStateTest::testDeleteDefaultStateAccess()
Test access to deleting the default state.
File
- core/
modules/ content_moderation/ tests/ src/ Functional/ DefaultModerationStateTest.php, line 49
Class
- DefaultModerationStateTest
- Tests setting a custom default moderation state.
Namespace
Drupal\Tests\content_moderation\FunctionalCode
public function testDeleteDefaultStateAccess() {
$this
->drupalGet('admin/config/workflow/workflows/manage/editorial/state/archived/delete');
$this
->assertSession()
->statusCodeEquals(200);
$this
->drupalPostForm('admin/config/workflow/workflows/manage/' . $this->workflow
->id(), [
'type_settings[workflow_settings][default_moderation_state]' => 'archived',
], 'Save');
$this
->drupalGet('admin/config/workflow/workflows/manage/editorial/state/archived/delete');
$this
->assertSession()
->statusCodeEquals(403);
}