public function RobotsTxtBasicTest::testRobotsTxtAdminAccess in RobotsTxt 8
Checks that an administrator can view the configuration page.
File
- tests/
src/ Functional/ RobotsTxtBasicTest.php, line 48
Class
- RobotsTxtBasicTest
- Tests basic functionality of configured robots.txt files.
Namespace
Drupal\Tests\robotstxt\FunctionalCode
public function testRobotsTxtAdminAccess() {
// Create user.
$this->adminUser = $this
->drupalCreateUser([
'administer robots.txt',
]);
$this
->drupalLogin($this->adminUser);
$this
->drupalGet('admin/config/search/robotstxt');
// The textarea for configuring robots.txt is shown.
$this
->assertSession()
->fieldExists('robotstxt_content');
}