public function ExtlinkTestBase::setUp in External Links 8
Overrides BrowserTestBase::setUp
3 calls to ExtlinkTestBase::setUp()
- ExtlinkExternalFileNoFollowTest::setUp in tests/
src/ FunctionalJavascript/ ExtlinkExternalFileNoFollowTest.php - ExtlinkExternalFileTargetTest::setUp in tests/
src/ FunctionalJavascript/ ExtlinkExternalFileTargetTest.php - ExtlinkExternalFileTest::setUp in tests/
src/ FunctionalJavascript/ ExtlinkExternalFileTest.php
3 methods override ExtlinkTestBase::setUp()
- ExtlinkExternalFileNoFollowTest::setUp in tests/
src/ FunctionalJavascript/ ExtlinkExternalFileNoFollowTest.php - ExtlinkExternalFileTargetTest::setUp in tests/
src/ FunctionalJavascript/ ExtlinkExternalFileTargetTest.php - ExtlinkExternalFileTest::setUp in tests/
src/ FunctionalJavascript/ ExtlinkExternalFileTest.php
File
- tests/
src/ FunctionalJavascript/ ExtlinkTestBase.php, line 72
Class
- ExtlinkTestBase
- Base class for External Link tests.
Namespace
Drupal\Tests\extlink\FunctionalJavascriptCode
public function setUp() {
// Enable any module that you will need in your tests.
parent::setUp();
// Create a normal user.
$permissions = [];
$this->normalUser = $this
->drupalCreateUser($permissions);
// Create an admin user.
$permissions[] = 'administer extlink';
$permissions[] = 'administer permissions';
$this->adminUser = $this
->drupalCreateUser($permissions);
$this->adminUser->roles[] = 'administrator';
$this->adminUser
->save();
// Create page content type that we will use for testing.
$this
->drupalCreateContentType([
'type' => 'page',
]);
// Add a text format with minimum data only.
$this->emptyFormat = FilterFormat::create([
'format' => 'empty_format',
'name' => 'Empty format',
]);
$this->emptyFormat
->save();
}