Commit 19b21a1f authored by gdd's avatar gdd
Browse files

Merge conflict from aspilicious' fixes

parent 2e50e5ba
......@@ -92,7 +92,9 @@ class ColorTestCase extends DrupalWebTestCase {
$this->assertTrue(strpos($stylesheet_content, 'color: ' . $test_values['scheme_color']) !== FALSE, 'Make sure the color we changed is in the color stylesheet. (' . $theme . ')');
// Test with aggregated CSS turned on.
variable_set('preprocess_css', 1);
$config = config('system.performance');
$config->set('preprocess_css', 1);
$config->save();
$this->drupalGet('<front>');
$stylesheets = variable_get('drupal_css_cache_files', array());
$stylesheet_content = '';
......@@ -100,7 +102,8 @@ class ColorTestCase extends DrupalWebTestCase {
$stylesheet_content .= join("\n", file(drupal_realpath($uri)));
}
$this->assertTrue(strpos($stylesheet_content, 'public://') === FALSE, 'Make sure the color paths have been translated to local paths. (' . $theme . ')');
variable_set('preprocess_css', 0);
$config->set('preprocess_css', 0);
$config->save();
}
/**
......
......@@ -95,7 +95,9 @@ class CacheTestCase extends DrupalWebTestCase {
* The time in seconds the cache should minimal live.
*/
protected function setupLifetime($time) {
variable_set('cache_lifetime', $time);
$config = config('system.performance');
$config->set('cache_lifetime', $time);
$config->save();
variable_set('cache_flush', 0);
}
}
......
......@@ -1171,8 +1171,10 @@ class CommonJavaScriptTestCase extends DrupalWebTestCase {
parent::setUp('locale', 'simpletest', 'common_test');
// Disable preprocessing
$this->preprocess_js = variable_get('preprocess_js', 0);
variable_set('preprocess_js', 0);
$config = config('system.performance');
$this->preprocess_js = $config->get('preprocess_js');
$config->set('preprocess_js', 0);
$config->save();
// Reset drupal_add_js() and drupal_add_library() statics before each test.
drupal_static_reset('drupal_add_js');
......@@ -1181,7 +1183,9 @@ class CommonJavaScriptTestCase extends DrupalWebTestCase {
function tearDown() {
// Restore configured value for JavaScript preprocessing.
variable_set('preprocess_js', $this->preprocess_js);
$config = config('system.performance');
$config->set('preprocess_js', $this->preprocess_js);
$config->save();
parent::tearDown();
}
......@@ -1379,7 +1383,9 @@ class CommonJavaScriptTestCase extends DrupalWebTestCase {
// Now ensure that with aggregation on, one file is made for the
// 'every_page' files, and one file is made for the others.
drupal_static_reset('drupal_add_js');
variable_set('preprocess_js', 1);
$config = config('system.performance');
$config->set('preprocess_js', 1);
$config->save();
drupal_add_js('core/misc/ajax.js');
drupal_add_js('core/misc/authorize.js', array('every_page' => TRUE));
drupal_add_js('core/misc/autocomplete.js');
......
......@@ -92,7 +92,9 @@ class ThemeUnitTest extends DrupalWebTestCase {
// what is output to the HTML HEAD based on what is in a theme's .info file,
// so it doesn't matter what page we get, as long as it is themed with the
// test theme. First we test with CSS aggregation disabled.
variable_set('preprocess_css', 0);
$config = config('system.performance');
$config->set('preprocess_css', 0);
$config->save();
$this->drupalGet('theme-test/suggestion');
$this->assertNoText('system.base.css', t('The theme\'s .info file is able to override a module CSS file from being added to the page.'));
......@@ -100,9 +102,11 @@ class ThemeUnitTest extends DrupalWebTestCase {
// triggered during drupal_build_css_cache() when a source file doesn't
// exist. Then allow remaining tests to continue with aggregation disabled
// by default.
variable_set('preprocess_css', 1);
$config->set('preprocess_css', 1);
$config->save();
$this->drupalGet('theme-test/suggestion');
variable_set('preprocess_css', 0);
$config->set('preprocess_css', 0);
$config->save();
}
/**
......
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