function UnpublishByKeywordActionTest::setUp

Same name in this branch
  1. 10 core/modules/node/tests/src/Kernel/Action/UnpublishByKeywordActionTest.php \Drupal\Tests\node\Kernel\Action\UnpublishByKeywordActionTest::setUp()
Same name and namespace in other branches
  1. 9 core/modules/node/tests/src/Kernel/Action/UnpublishByKeywordActionTest.php \Drupal\Tests\node\Kernel\Action\UnpublishByKeywordActionTest::setUp()
  2. 8.9.x core/modules/node/tests/src/Kernel/Action/UnpublishByKeywordActionTest.php \Drupal\Tests\node\Kernel\Action\UnpublishByKeywordActionTest::setUp()
  3. 11.x core/modules/node/tests/src/Kernel/Action/UnpublishByKeywordActionTest.php \Drupal\Tests\node\Kernel\Action\UnpublishByKeywordActionTest::setUp()

Overrides KernelTestBase::setUp

File

core/modules/action/tests/src/Kernel/UnpublishByKeywordActionTest.php, line 26

Class

UnpublishByKeywordActionTest
@group action

Namespace

Drupal\Tests\action\Kernel

Code

protected function setUp() : void {
  parent::setUp();
  $this->installEntitySchema('node');
  $this->installEntitySchema('user');
  $this->installSchema('node', [
    'node_access',
  ]);
  // Install system's configuration as default date formats are needed.
  $this->installConfig([
    'system',
  ]);
  // Create a node type for testing.
  $type = NodeType::create([
    'type' => 'page',
    'name' => 'page',
    'display_submitted' => FALSE,
  ]);
  $type->save();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.