You are here

protected function NodeTest::setUp in Scheduled Publish 8.2

Same name and namespace in other branches
  1. 8.3 tests/src/Kernel/NodeTest.php \Drupal\Tests\scheduled_publish\Kernel\NodeTest::setUp()

Set the default field storage backend for fields created during tests.

Overrides FieldKernelTestBase::setUp

File

tests/src/Kernel/NodeTest.php, line 40

Class

NodeTest
Class NodeTests

Namespace

Drupal\Tests\scheduled_publish\Kernel

Code

protected function setUp() {
  parent::setUp();
  $this
    ->setInstallProfile('standard');
  $this
    ->installConfig([
    'field',
    'system',
    'content_moderation',
    'scheduled_publish',
  ]);
  $this
    ->installEntitySchema('node');
  $this
    ->installSchema('node', 'node_access');
  $this
    ->installEntitySchema('user');
  $this
    ->installEntitySchema('content_moderation_state');
  $this
    ->installConfig('content_moderation');
  $this->scheduledUpdateService = \Drupal::service('scheduled_publish.update');
  $this
    ->createNodeType();
}