function NodeTestBase::setUp
Same name in this branch
- 8.9.x core/modules/node/src/Tests/Views/NodeTestBase.php \Drupal\node\Tests\Views\NodeTestBase::setUp()
- 8.9.x core/modules/node/tests/src/Functional/Views/NodeTestBase.php \Drupal\Tests\node\Functional\Views\NodeTestBase::setUp()
- 8.9.x core/modules/node/tests/src/Functional/NodeTestBase.php \Drupal\Tests\node\Functional\NodeTestBase::setUp()
Same name in other branches
- 9 core/modules/node/tests/src/Functional/Views/NodeTestBase.php \Drupal\Tests\node\Functional\Views\NodeTestBase::setUp()
- 9 core/modules/node/tests/src/Functional/NodeTestBase.php \Drupal\Tests\node\Functional\NodeTestBase::setUp()
- 10 core/modules/node/tests/src/Functional/Views/NodeTestBase.php \Drupal\Tests\node\Functional\Views\NodeTestBase::setUp()
- 10 core/modules/node/tests/src/Functional/NodeTestBase.php \Drupal\Tests\node\Functional\NodeTestBase::setUp()
- 11.x core/modules/node/tests/src/Functional/Views/NodeTestBase.php \Drupal\Tests\node\Functional\Views\NodeTestBase::setUp()
- 11.x core/modules/node/tests/src/Functional/NodeTestBase.php \Drupal\Tests\node\Functional\NodeTestBase::setUp()
Overrides WebTestBase::setUp
File
-
core/
modules/ node/ src/ Tests/ NodeTestBase.php, line 39
Class
- NodeTestBase
- Sets up page and article content types.
Namespace
Drupal\node\TestsCode
protected function setUp() {
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.