function NodePerformanceTest::setUp

Overrides PerformanceTestBase::setUp

File

core/modules/node/tests/src/FunctionalJavascript/NodePerformanceTest.php, line 48

Class

NodePerformanceTest
Tests the performance of node functionality including cache invalidation.

Namespace

Drupal\Tests\node\FunctionalJavascript

Code

protected function setUp() : void {
  parent::setUp();
  // Enable the promoted content view and rebuild routes.
  $this->enablePromotedContentView();
  // Create a test content type.
  $this->drupalCreateContentType([
    'type' => 'test_content',
    'name' => 'Test Content',
  ]);
  // Create a node to be shown on the promoted content view.
  $this->drupalCreateNode([
    'type' => 'test_content',
    'promote' => NodeInterface::PROMOTED,
  ]);
}

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