Yaffs site version 1.1
[yaffs-website] / web / modules / contrib / advagg / src / Tests / AdvaggTestBase.php
1 <?php
2
3 namespace Drupal\advagg\Tests;
4
5 use Drupal\simpletest\WebTestBase;
6
7 /**
8  * @defgroup advagg_tests Test Suit
9  *
10  * @{
11  * The automated test suit for Advanced Aggregates.
12  *
13  * @}
14  */
15
16 /**
17  * Base test class for Advagg test cases.
18  */
19 abstract class AdvaggTestBase extends WebTestBase {
20
21   /**
22    * Modules to enable.
23    *
24    * @var array
25    */
26   public static $modules = ['advagg'];
27
28   /**
29    * A user with permission to administer site configuration.
30    *
31    * @var \Drupal\user\UserInterface
32    */
33   protected $user;
34
35   /**
36    * Editable Advagg configuration.
37    *
38    * @var \Drupal\Core\Config\Config
39    */
40   protected $config;
41
42   /**
43    * Editable system configuration.
44    *
45    * @var \Drupal\Core\Config\Config
46    */
47   protected $systemConfig;
48
49   /**
50    * {@inheritdoc}
51    */
52   protected function setUp() {
53     parent::setUp();
54     $this->user = $this->drupalCreateUser(['administer site configuration']);
55     $this->drupalLogin($this->user);
56     $this->config = \Drupal::configFactory()->getEditable('advagg.settings');
57
58     // Enable aggregation.
59     $this->systemConfig = \Drupal::configFactory()->getEditable('system.performance');
60     $this->systemConfig->set('css.preprocess', TRUE)
61       ->set('js.preprocess', TRUE)
62       ->save();
63
64   }
65
66 }