public function ModerationStateFieldTest::testModerationStateFieldIsCreated in Workbench Moderation 8.2
Same name and namespace in other branches
- 8 tests/src/Kernel/ModerationStateFieldTest.php \Drupal\Tests\workbench_moderation\Kernel\ModerationStateFieldTest::testModerationStateFieldIsCreated()
Covers moderation_state_install().
File
- tests/
src/ Kernel/ ModerationStateFieldTest.php, line 31
Class
- ModerationStateFieldTest
- Tests moderation state field. @group workbench_moderation
Namespace
Drupal\Tests\workbench_moderation\KernelCode
public function testModerationStateFieldIsCreated() {
// There should be no updates as moderation_state_install() should have
// applied the new field.
$this
->assertTrue(empty($this->container
->get('entity.definition_update_manager')
->needsUpdates()['node']));
$this
->assertTrue(!empty($this->container
->get('entity_field.manager')
->getFieldStorageDefinitions('node')['moderation_state']));
}