function NodePageVariableDeprecationTest::setUp

Overrides NodeTestBase::setUp

File

core/modules/node/tests/src/Functional/NodePageVariableDeprecationTest.php, line 25

Class

NodePageVariableDeprecationTest
Tests page variable deprecation.

Namespace

Drupal\Tests\node\Functional

Code

protected function setUp() : void {
  parent::setUp();
  $this->drupalCreateContentType([
    'type' => 'test_page_variable',
  ]);
  EntityViewMode::create([
    'id' => 'node.test_page_variable',
    'targetEntityType' => 'node',
    'status' => TRUE,
    'enabled' => TRUE,
    'label' => 'Test page variable',
  ])->save();
}

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