You are here

public function AdvAggJavaScriptTestCase::setUp in Advanced CSS/JS Aggregation 7.2

Install the advagg module and include needed files.

Overrides DrupalWebTestCase::setUp

File

tests/advagg.test, line 771
Tests for advagg.module.

Class

AdvAggJavaScriptTestCase
Tests for the JavaScript system.

Code

public function setUp() {

  // Enable Locale and SimpleTest in the test environment.
  parent::setUp(array(
    'locale',
    'locale_test',
    'simpletest',
    'common_test',
    'form_test',
    'advagg',
    'color',
  ));

  // Include the advagg.module file.
  drupal_load('module', 'advagg');
  module_load_include('inc', 'advagg', 'advagg');

  // Disable preprocessing.
  $this->preprocessJs = variable_get('preprocess_js', 0);
  variable_set('preprocess_js', 0);

  // Reset before each test.
  advagg_test_reset_statics();

  // Set settings for testing.
  $GLOBALS['conf']['advagg_convert_absolute_to_relative_path'] = FALSE;
  $GLOBALS['conf']['advagg_convert_absolute_to_protocol_relative_path'] = FALSE;
  $GLOBALS['conf']['advagg_force_https_path'] = FALSE;
  $GLOBALS['conf']['advagg_mod_js_footer'] = 0;
}