public function HumansTxtBasicTest::setUp in Humans.txt 8
Same name and namespace in other branches
- 2.x 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() . '">';
}