SitemapCssTest.php in Sitemap 8
File
src/Tests/SitemapCssTest.php
View source
<?php
namespace Drupal\sitemap\Tests;
use Drupal\simpletest\WebTestBase;
class SitemapCssTest extends WebTestBase {
public static $modules = [
'sitemap',
];
protected function setUp() {
parent::setUp();
$this->user = $this
->drupalCreateUser([
'administer sitemap',
'access sitemap',
]);
$this
->drupalLogin($this->user);
}
public function testIncludeCssFile() {
$this
->drupalGet('/sitemap');
$this
->assertRaw('sitemap.theme.css');
$edit = [
'css' => FALSE,
];
$this
->drupalPostForm('admin/config/search/sitemap', $edit, t('Save configuration'));
$this
->drupalGet('/sitemap');
$this
->assertNoRaw('sitemap.theme.css');
}
}
Classes
Name |
Description |
SitemapCssTest |
Tests the inclusion of the sitemap css file based on sitemap settings. |