function SummaryLengthTest::setUp

Same name in other branches
  1. 9 core/modules/node/tests/src/Kernel/SummaryLengthTest.php \Drupal\Tests\node\Kernel\SummaryLengthTest::setUp()
  2. 8.9.x core/modules/node/tests/src/Kernel/SummaryLengthTest.php \Drupal\Tests\node\Kernel\SummaryLengthTest::setUp()
  3. 11.x core/modules/node/tests/src/Kernel/SummaryLengthTest.php \Drupal\Tests\node\Kernel\SummaryLengthTest::setUp()

Overrides KernelTestBase::setUp

File

core/modules/node/tests/src/Kernel/SummaryLengthTest.php, line 54

Class

SummaryLengthTest
Tests summary length.

Namespace

Drupal\Tests\node\Kernel

Code

protected function setUp() : void {
    parent::setUp();
    $this->installSchema('node', 'node_access');
    $this->installEntitySchema('user');
    $this->installEntitySchema('node');
    $this->installConfig('filter');
    $this->installConfig('node');
    // Create a node type.
    $this->drupalCreateContentType([
        'type' => 'page',
        'name' => 'Basic page',
        'display_submitted' => FALSE,
    ]);
    DateFormat::create([
        'id' => 'fallback',
        'label' => 'Fallback',
        'pattern' => 'Y-m-d',
    ])->save();
}

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