SitemapTest.php in Sitemap 2.0.x
File
src/Tests/SitemapTest.php
View source
<?php
namespace Drupal\sitemap\Tests;
class SitemapTest extends SitemapTestBase {
public function testSitemap() {
$this
->drupalLogin($this->userView);
$this
->drupalGet('/sitemap');
$this
->assertResponse('200');
$this
->drupalLogin($this->userNoAccess);
$this
->drupalGet('/sitemap');
$this
->assertResponse('403');
}
public function testSitemapAdmin() {
$this
->drupalLogin($this->userAdmin);
$this
->drupalGet('/admin/config/search/sitemap');
$this
->assertResponse('200');
$this
->drupalLogin($this->userView);
$this
->drupalGet('/admin/config/search/sitemap');
$this
->assertResponse('403');
}
}
Classes
Name |
Description |
SitemapTest |
Tests the routes provided by the sitemap module. |