You are here

protected function NopremiumKernelTestBase::setUp in Node Option Premium 8

Overrides EntityKernelTestBase::setUp

1 call to NopremiumKernelTestBase::setUp()
NodeViewTest::setUp in tests/src/Kernel/NodeViewTest.php
1 method overrides NopremiumKernelTestBase::setUp()
NodeViewTest::setUp in tests/src/Kernel/NodeViewTest.php

File

tests/src/Kernel/NopremiumKernelTestBase.php, line 37

Class

NopremiumKernelTestBase
Provides a base class for nopremium kernel tests.

Namespace

Drupal\Tests\nopremium\Kernel

Code

protected function setUp() {
  parent::setUp();

  // Install database schemes.
  $this
    ->installEntitySchema('node');
  $this
    ->installSchema('node', 'node_access');
  $this
    ->installConfig([
    'system',
    'nopremium',
    'field',
    'filter',
    'node',
  ]);

  // Create a content type.
  $this->nodeType = NodeType::create([
    'type' => 'article',
    'name' => 'Article',
  ]);
  $this->nodeType
    ->save();
  node_add_body_field($this->nodeType);
}