public function LinkCheckerEditFormTest::setUp in Link checker 8
Overrides BrowserTestBase::setUp
File
- tests/
src/ Functional/ LinkCheckerEditFormTest.php, line 39
Class
- LinkCheckerEditFormTest
- Test Link checker module edit form.
Namespace
Drupal\Tests\linkchecker\FunctionalCode
public function setUp() {
parent::setUp();
// Create Basic page and Article node types.
$node_type = NodeType::create([
'type' => static::NODE_TYPE,
'name' => 'Basic page',
'format' => 'full_html',
]);
$node_type
->save();
// Create a body field instance for the 'page' node type.
$node_body_field = node_add_body_field($node_type);
$node_body_field
->setThirdPartySetting('linkchecker', 'scan', TRUE);
$node_body_field
->setThirdPartySetting('linkchecker', 'extractor', 'html_link_extractor');
$node_body_field
->save();
$this->adminUser = $this
->drupalCreateUser([
'administer linkchecker',
'bypass node access',
'access broken links report',
]);
$this
->drupalLogin($this->adminUser);
}