ModerationStateFieldTest.php in Workbench Moderation 8
File
tests/src/Kernel/ModerationStateFieldTest.php
View source
<?php
namespace Drupal\Tests\workbench_moderation\Kernel;
use Drupal\KernelTests\KernelTestBase;
class ModerationStateFieldTest extends KernelTestBase {
public static $modules = [
'workbench_moderation',
'node',
'views',
'options',
'user',
];
protected function setUp() {
parent::setUp();
$this
->installEntitySchema('node');
}
public function testModerationStateFieldIsCreated() {
$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']));
}
}