protected function NodeTestBase::setUp in Drupal 10
Same name in this branch
- 10 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()
Same name and namespace in other branches
- 8 core/modules/node/tests/src/Functional/NodeTestBase.php \Drupal\Tests\node\Functional\NodeTestBase::setUp()
- 9 core/modules/node/tests/src/Functional/NodeTestBase.php \Drupal\Tests\node\Functional\NodeTestBase::setUp()
File
- core/
modules/ node/ tests/ src/ Functional/ NodeTestBase.php, line 32
Class
- NodeTestBase
- Sets up page and article content types.
Namespace
Drupal\Tests\node\FunctionalCode
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');
}