public function HumansTxtBasicTest::setUp in Humans.txt 2.x
Same name and namespace in other branches
- 8 tests/src/Functional/HumansTxtBasicTest.php \Drupal\Tests\humanstxt\Functional\HumansTxtBasicTest::setUp()
Overrides BrowserTestBase::setUp
File
- tests/
src/ Functional/ HumansTxtBasicTest.php, line 53
Class
- HumansTxtBasicTest
- Tests basic functionality of configured humans.txt files.
Namespace
Drupal\Tests\humanstxt\FunctionalCode
public function setUp() {
parent::setUp();
// Create users.
$this->adminUser = $this
->drupalCreateUser([
'administer humans.txt',
]);
$this->normalUser = $this
->drupalCreateUser([
'access content',
]);
// Create link.
$this->fileLink = '<link rel="author" type="text/plain" hreflang="x-default" href="' . Url::fromRoute('humanstxt.content', [], [
'absolute' => TRUE,
])
->toString() . '">';
}