function DefaultModerationStateUpdateTest::testUpdateDefaultModerationState
Tests updating the default moderation state setting.
File
-
core/
modules/ content_moderation/ tests/ src/ Functional/ Update/ DefaultModerationStateUpdateTest.php, line 31
Class
- DefaultModerationStateUpdateTest
- Tests the upgrade path for updating the 'default_moderation_state' setting.
Namespace
Drupal\Tests\content_moderation\Functional\UpdateCode
public function testUpdateDefaultModerationState() {
$workflow = Workflow::load('editorial');
$this->assertArrayNotHasKey('default_moderation_state', $workflow->getTypePlugin()
->getConfiguration());
$this->runUpdates();
$workflow = Workflow::load('editorial');
$this->assertEquals('draft', $workflow->getTypePlugin()
->getConfiguration()['default_moderation_state']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.