SiteMapCssTest.php in Site map 8
File
src/Tests/SiteMapCssTest.php
View source
<?php
namespace Drupal\site_map\Tests;
use Drupal\simpletest\WebTestBase;
class SiteMapCssTest extends WebTestBase {
public static $modules = array(
'site_map',
'filter',
);
protected function setUp() {
parent::setUp();
$this->user = $this
->drupalCreateUser(array(
'administer site configuration',
'access site map',
));
$this
->drupalLogin($this->user);
}
public function testIncludeCssFile() {
$this
->drupalGet('/sitemap');
$this
->assertRaw('site_map.theme.css');
$edit = array(
'css' => TRUE,
);
$this
->drupalPostForm('admin/config/search/sitemap', $edit, t('Save configuration'));
$this
->drupalPostForm('admin/config/development/performance', array(), 'Clear all caches');
$this
->drupalGet('/sitemap');
$this
->assertNoRaw('site_map.theme.css');
}
}