Commit a2a6f6cd authored by webchick's avatar webchick

Issue #2259167 by sun: Disable CSS/JS aggregation and caching in tests by default.

parent 4440d95b
......@@ -89,11 +89,6 @@ function setUp() {
'123456' => FALSE,
'#00000g' => FALSE,
);
// Turn off CSS aggregation.
\Drupal::config('system.performance')
->set('css.preprocess', FALSE)
->save();
}
/**
......
......@@ -887,9 +887,16 @@ protected function setUp() {
->set('interface.default', 'test_mail_collector')
->save();
// Ensure errors are displayed.
// By default, verbosely display all errors and disable all production
// environment optimizations for all tests to avoid needless overhead and
// ensure a sane default experience for test authors.
// @see https://drupal.org/node/2259167
\Drupal::config('system.logging')
->set('error_level', 'all')
->set('error_level', 'verbose')
->save();
\Drupal::config('system.performance')
->set('css.preprocess', FALSE)
->set('js.preprocess', FALSE)
->save();
// Restore the original Simpletest batch.
......
......@@ -72,7 +72,7 @@ function testLogging() {
$path = 'node/' . $this->node->id();
$module_path = drupal_get_path('module', 'statistics');
$stats_path = $base_url . '/' . $module_path . '/statistics.php';
$expected_library = str_replace('/', '\/', $module_path . '/statistics.js');
$expected_library = $module_path . '/statistics.js';
$expected_settings = '"statistics":{"data":{"nid":"' . $this->node->id() . '"}';
// Verify that logging scripts are not found on a non-node page.
......
......@@ -29,11 +29,6 @@ protected function setUp() {
// Grant the anonymous user the permission to look at user profiles.
user_role_grant_permissions('anonymous', array('access user profiles'));
// Turn off JS aggregation.
\Drupal::config('system.performance')
->set('js.preprocess', FALSE)
->save();
}
/**
......
......@@ -43,11 +43,6 @@ function setUp() {
* Otherwise, collapse.js adds "SHOW" or "HIDE" labels to the tabs.
*/
function testJavaScriptOrdering() {
// Turn off JS aggregation.
\Drupal::config('system.performance')
->set('js.preprocess', FALSE)
->save();
$this->drupalGet('form_test/vertical-tabs');
$position1 = strpos($this->content, 'core/misc/vertical-tabs.js');
$position2 = strpos($this->content, 'core/misc/collapse.js');
......
......@@ -47,11 +47,6 @@ function setUp() {
// Enable dummy module that implements hook_menu.
parent::setUp();
// Turn off CSS aggregation.
\Drupal::config('system.performance')
->set('css.preprocess', FALSE)
->save();
$this->drupalPlaceBlock('system_menu_block:tools');
}
......
......@@ -186,11 +186,6 @@ function testThemeSettings() {
function testAdministrationTheme() {
$this->container->get('theme_handler')->enable(array('seven'));
// Turn off CSS aggregation.
\Drupal::config('system.performance')
->set('css.preprocess', FALSE)
->save();
// Enable an administration theme and show it on the node admin pages.
$edit = array(
'admin_theme' => 'seven',
......
......@@ -29,18 +29,6 @@ public static function getInfo() {
);
}
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
// Turn off CSS aggregation.
\Drupal::config('system.performance')
->set('css.preprocess', FALSE)
->save();
}
/**
* Test that the theme system can generate output in a request listener.
*/
......
......@@ -29,18 +29,6 @@ public static function getInfo() {
);
}
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
// Turn off CSS aggregation.
\Drupal::config('system.performance')
->set('css.preprocess', FALSE)
->save();
}
/**
* Tests stylesheets-override and stylesheets-remove.
*/
......
......@@ -31,11 +31,6 @@ function setUp() {
->set('admin', 'seven')
->save();
// Turn off CSS aggregation.
\Drupal::config('system.performance')
->set('css.preprocess', FALSE)
->save();
// Create and log in as a user who has permission to add and edit taxonomy
// terms and view the administrative theme.
$admin_user = $this->drupalCreateUser(array('administer taxonomy', 'view the administration theme'));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment