function NodePreviewLinkTest::setUp
Same name in other branches
- 9 core/modules/node/tests/src/FunctionalJavascript/NodePreviewLinkTest.php \Drupal\Tests\node\FunctionalJavascript\NodePreviewLinkTest::setUp()
- 8.9.x core/modules/node/tests/src/FunctionalJavascript/NodePreviewLinkTest.php \Drupal\Tests\node\FunctionalJavascript\NodePreviewLinkTest::setUp()
- 11.x core/modules/node/tests/src/FunctionalJavascript/NodePreviewLinkTest.php \Drupal\Tests\node\FunctionalJavascript\NodePreviewLinkTest::setUp()
Overrides BrowserTestBase::setUp
File
-
core/
modules/ node/ tests/ src/ FunctionalJavascript/ NodePreviewLinkTest.php, line 30
Class
- NodePreviewLinkTest
- Tests the JavaScript prevention of navigation away from node previews.
Namespace
Drupal\Tests\node\FunctionalJavascriptCode
protected function setUp() : void {
parent::setUp();
$filtered_html_format = FilterFormat::create([
'format' => 'filtered_html',
'name' => 'Filtered HTML',
]);
$filtered_html_format->save();
$this->drupalCreateContentType([
'type' => 'test',
]);
$user = $this->drupalCreateUser([
'access content',
'edit own test content',
'create test content',
$filtered_html_format->getPermissionName(),
]);
$this->drupalLogin($user);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.