function NodePreviewLinkTest::setUp
Same name in other branches
- 8.9.x core/modules/node/tests/src/FunctionalJavascript/NodePreviewLinkTest.php \Drupal\Tests\node\FunctionalJavascript\NodePreviewLinkTest::setUp()
- 10 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 28
Class
- NodePreviewLinkTest
- Tests the JavaScript prevention of navigation away from node previews.
Namespace
Drupal\Tests\node\FunctionalJavascriptCode
public 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.