public function RobotsTxtBasicTestCase::testRobotsTxtAdminAccess in RobotsTxt 7
Checks that an administrator can view the configuration page.
File
- ./
robotstxt.test, line 39 - Tests for robotstxt.module.
Class
- RobotsTxtBasicTestCase
- Tests basic functionality of configured robots.txt files.
Code
public function testRobotsTxtAdminAccess() {
// Create an admin user, log in and access settings form.
$admin_user = $this
->drupalCreateUser(array(
'administer robots.txt',
));
$this
->drupalLogin($admin_user);
$this
->drupalGet('admin/config/search/robotstxt');
$this
->assertResponse(200);
$this
->assertFieldById('edit-robotstxt', NULL, 'The textarea for configuring robots.txt is shown.');
}