function TrackerTest::setUp
Same name in other branches
- 7.x modules/tracker/tracker.test \TrackerTest::setUp()
- 9 core/modules/tracker/tests/src/Functional/TrackerTest.php \Drupal\Tests\tracker\Functional\TrackerTest::setUp()
- 8.9.x core/modules/tracker/tests/src/Functional/TrackerTest.php \Drupal\Tests\tracker\Functional\TrackerTest::setUp()
- 11.x core/modules/tracker/tests/src/Functional/TrackerTest.php \Drupal\Tests\tracker\Functional\TrackerTest::setUp()
Overrides BrowserTestBase::setUp
File
-
core/
modules/ tracker/ tests/ src/ Functional/ TrackerTest.php, line 64
Class
- TrackerTest
- Create and delete nodes and check for their display in the tracker listings.
Namespace
Drupal\Tests\tracker\FunctionalCode
protected function setUp() : void {
parent::setUp();
$this->drupalCreateContentType([
'type' => 'page',
'name' => 'Basic page',
]);
$permissions = [
'access comments',
'create page content',
'post comments',
'skip comment approval',
];
$this->user = $this->drupalCreateUser($permissions);
$this->otherUser = $this->drupalCreateUser($permissions);
$this->addDefaultCommentField('node', 'page');
user_role_grant_permissions(AccountInterface::ANONYMOUS_ROLE, [
'access content',
'access user profiles',
]);
$this->drupalPlaceBlock('local_tasks_block', [
'id' => 'page_tabs_block',
]);
$this->drupalPlaceBlock('local_actions_block', [
'id' => 'page_actions_block',
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.