Base test class for Advagg test cases.
Hierarchy
- class \Drupal\advagg\Tests\AdvaggTestBase extends \Drupal\simpletest\WebTestBase
Expanded class hierarchy of AdvaggTestBase
File
-
src/
Tests/ AdvaggTestBase.php, line 19
Namespace
Drupal\advagg\TestsView source
abstract class AdvaggTestBase extends WebTestBase {
/**
* Modules to enable.
*
* @var array
*/
public static $modules = [
'advagg',
];
/**
* A user with permission to administer site configuration.
*
* @var \Drupal\user\UserInterface
*/
protected $user;
/**
* Editable Advagg configuration.
*
* @var \Drupal\Core\Config\Config
*/
protected $config;
/**
* Editable system configuration.
*
* @var \Drupal\Core\Config\Config
*/
protected $systemConfig;
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->user = $this->drupalCreateUser([
'administer site configuration',
]);
$this->drupalLogin($this->user);
$this->config = \Drupal::configFactory()->getEditable('advagg.settings');
// Enable aggregation.
$this->systemConfig = \Drupal::configFactory()->getEditable('system.performance');
$this->systemConfig
->set('css.preprocess', TRUE)
->set('js.preprocess', TRUE)
->save();
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
AdvaggTestBase::$config | protected | property | Editable Advagg configuration. | |
AdvaggTestBase::$modules | public static | property | Modules to enable. | 8 |
AdvaggTestBase::$systemConfig | protected | property | Editable system configuration. | |
AdvaggTestBase::$user | protected | property | A user with permission to administer site configuration. | |
AdvaggTestBase::setUp | protected | function |