public function WorkbenchModerationSchemaTest::testWorkbenchModerationDefaultConfig in Workbench Moderation 8.2
Tests workbench moderation default schema.
File
- tests/
src/ Kernel/ WorkbenchModerationSchemaTest.php, line 29
Class
- WorkbenchModerationSchemaTest
- Ensures that workbench moderation schema is correct.
Namespace
Drupal\workbench_moderation\TestsCode
public function testWorkbenchModerationDefaultConfig() {
$this
->installConfig([
'workbench_moderation',
]);
$typed_config = \Drupal::service('config.typed');
$moderation_states = ModerationState::loadMultiple();
foreach ($moderation_states as $moderation_state) {
$this
->assertConfigSchema($typed_config, $moderation_state
->getEntityType()
->getConfigPrefix() . '.' . $moderation_state
->id(), $moderation_state
->toArray());
}
$moderation_state_transitions = ModerationStateTransition::loadMultiple();
foreach ($moderation_state_transitions as $moderation_state_transition) {
$this
->assertConfigSchema($typed_config, $moderation_state_transition
->getEntityType()
->getConfigPrefix() . '.' . $moderation_state_transition
->id(), $moderation_state_transition
->toArray());
}
}