protected function XAutoloadWebTestCase::xautoloadCheckCacheMode in X Autoload 7.3
3 calls to XAutoloadWebTestCase::xautoloadCheckCacheMode()
- XAutoloadWebTestCase::testApcCache in lib/
Drupal/ xautoload/ Tests/ XAutoloadWebTestCase.php - XAutoloadWebTestCase::testApcLazyCache in lib/
Drupal/ xautoload/ Tests/ XAutoloadWebTestCase.php - XAutoloadWebTestCase::testNoCache in lib/
Drupal/ xautoload/ Tests/ XAutoloadWebTestCase.php
File
- lib/
Drupal/ xautoload/ Tests/ XAutoloadWebTestCase.php, line 31
Class
Namespace
Drupal\xautoload\TestsCode
protected function xautoloadCheckCacheMode($mode) {
variable_set('xautoload_cache_mode', $mode);
$this
->pass("Set cache mode: '{$mode}'");
// Enable xautoload.
module_enable(array(
'xautoload',
), FALSE);
// At this time the xautoload_cache_mode setting is not in effect yet,
// so we have to clear old cached values from APC cache.
xautoload('apcKeyManager')
->renewApcPrefix();
$modules = array(
'xautoload_test_1' => FALSE,
'xautoload_test_2' => TRUE,
);
module_enable(array_keys($modules));
menu_rebuild();
foreach ($modules as $module => $classes_on_include) {
$classes = array(
'Drupal\\' . $module . '\\ExampleClass',
$module . '_ExampleClass',
);
$this
->xautoloadModuleEnabled($module, $classes, $classes_on_include);
$this
->xautoloadModuleCheckJson($module, $mode, $classes);
}
}