public function DefaultModerationStateTest::testDeleteDefaultStateAccess in Drupal 9
Same name and namespace in other branches
- 8 core/modules/content_moderation/tests/src/Functional/DefaultModerationStateTest.php \Drupal\Tests\content_moderation\Functional\DefaultModerationStateTest::testDeleteDefaultStateAccess()
Tests access to deleting the default state.
File
- core/
modules/ content_moderation/ tests/ src/ Functional/ DefaultModerationStateTest.php, line 48
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
->drupalGet('admin/config/workflow/workflows/manage/' . $this->workflow
->id());
$this
->submitForm([
'type_settings[workflow_settings][default_moderation_state]' => 'archived',
], 'Save');
$this
->drupalGet('admin/config/workflow/workflows/manage/editorial/state/archived/delete');
$this
->assertSession()
->statusCodeEquals(403);
}