function NodeTestBase::setUp

Same name in this branch
  1. 11.x core/modules/node/tests/src/Functional/Views/NodeTestBase.php \Drupal\Tests\node\Functional\Views\NodeTestBase::setUp()
Same name in other branches
  1. 9 core/modules/node/tests/src/Functional/Views/NodeTestBase.php \Drupal\Tests\node\Functional\Views\NodeTestBase::setUp()
  2. 9 core/modules/node/tests/src/Functional/NodeTestBase.php \Drupal\Tests\node\Functional\NodeTestBase::setUp()
  3. 8.9.x core/modules/node/src/Tests/Views/NodeTestBase.php \Drupal\node\Tests\Views\NodeTestBase::setUp()
  4. 8.9.x core/modules/node/src/Tests/NodeTestBase.php \Drupal\node\Tests\NodeTestBase::setUp()
  5. 8.9.x core/modules/node/tests/src/Functional/Views/NodeTestBase.php \Drupal\Tests\node\Functional\Views\NodeTestBase::setUp()
  6. 8.9.x core/modules/node/tests/src/Functional/NodeTestBase.php \Drupal\Tests\node\Functional\NodeTestBase::setUp()
  7. 10 core/modules/node/tests/src/Functional/Views/NodeTestBase.php \Drupal\Tests\node\Functional\Views\NodeTestBase::setUp()
  8. 10 core/modules/node/tests/src/Functional/NodeTestBase.php \Drupal\Tests\node\Functional\NodeTestBase::setUp()

Overrides BrowserTestBase::setUp

28 calls to NodeTestBase::setUp()
ContentTranslationLanguageChangeTest::setUp in core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php
ContentTranslationOperationsTest::setUp in core/modules/content_translation/tests/src/Functional/ContentTranslationOperationsTest.php
NodeAccessBaseTableTest::setUp in core/modules/node/tests/src/Functional/NodeAccessBaseTableTest.php
NodeAccessCacheabilityTest::setUp in core/modules/node/tests/src/Functional/NodeAccessCacheabilityTest.php
NodeAccessFieldTest::setUp in core/modules/node/tests/src/Functional/NodeAccessFieldTest.php

... See full list

28 methods override NodeTestBase::setUp()
ContentTranslationLanguageChangeTest::setUp in core/modules/content_translation/tests/src/Functional/ContentTranslationLanguageChangeTest.php
ContentTranslationOperationsTest::setUp in core/modules/content_translation/tests/src/Functional/ContentTranslationOperationsTest.php
NodeAccessBaseTableTest::setUp in core/modules/node/tests/src/Functional/NodeAccessBaseTableTest.php
NodeAccessCacheabilityTest::setUp in core/modules/node/tests/src/Functional/NodeAccessCacheabilityTest.php
NodeAccessFieldTest::setUp in core/modules/node/tests/src/Functional/NodeAccessFieldTest.php

... See full list

File

core/modules/node/tests/src/Functional/NodeTestBase.php, line 32

Class

NodeTestBase
Sets up page and article content types.

Namespace

Drupal\Tests\node\Functional

Code

protected function setUp() : void {
    parent::setUp();
    // Create Basic page and Article node types.
    if ($this->profile != 'standard') {
        $this->drupalCreateContentType([
            'type' => 'page',
            'name' => 'Basic page',
            'display_submitted' => FALSE,
        ]);
        $this->drupalCreateContentType([
            'type' => 'article',
            'name' => 'Article',
        ]);
    }
    $this->accessHandler = \Drupal::entityTypeManager()->getAccessControlHandler('node');
}

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