public function SitemapTest::testSitemapAdmin in Sitemap 2.0.x
Same name and namespace in other branches
- 8.2 src/Tests/SitemapTest.php \Drupal\sitemap\Tests\SitemapTest::testSitemapAdmin()
Test user access and page locations for administrators.
File
- src/
Tests/ SitemapTest.php, line 32
Class
- SitemapTest
- Tests the routes provided by the sitemap module.
Namespace
Drupal\sitemap\TestsCode
public function testSitemapAdmin() {
// Find the Sitemap settings page.
$this
->drupalLogin($this->userAdmin);
$this
->drupalGet('/admin/config/search/sitemap');
$this
->assertResponse('200');
// Unauthorized users cannot view the sitemap.
$this
->drupalLogin($this->userView);
$this
->drupalGet('/admin/config/search/sitemap');
$this
->assertResponse('403');
}