function SummaryLengthTest::setUp

Same name and namespace in other branches
  1. 9 core/modules/node/tests/src/Kernel/SummaryLengthTest.php \Drupal\Tests\node\Kernel\SummaryLengthTest::setUp()
  2. 10 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 52

Class

SummaryLengthTest
Tests summary length.

Namespace

Drupal\Tests\node\Kernel

Code

protected function setUp() {
    parent::setUp();
    $this->installSchema('system', 'sequences');
    $this->installSchema('node', 'node_access');
    $this->installEntitySchema('user');
    $this->installEntitySchema('node');
    $this->installEntitySchema('date_format');
    $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.