Skip to content
Snippets Groups Projects
Commit 9c1f7aa8 authored by Alberto Paderno's avatar Alberto Paderno
Browse files

Issue #3464165: Add code to ApcCacheTestCase::setUp() to verify the cache bins...

Issue #3464165: Add code to ApcCacheTestCase::setUp() to verify the cache bins in ApcCacheTestCase::$cacheBins are effectively handled by DrupalApcCache
parent d43e9eb7
No related branches found
No related tags found
1 merge request!44Issue #3464165: Add code to ApcCacheTestCase::setUp() to verify the cache bins in ApcCacheTestCase::$cacheBins are effectively handled by DrupalApcCache
Pipeline #236307 passed
......@@ -54,10 +54,27 @@ class ApcCacheTestCase extends DrupalWebTestCase {
foreach ($this->cacheBins as $bin) {
variable_set("cache_flush_$bin", 0);
variable_set("cache_class_$bin", 'DrupalApcuCache');
$obj = _cache_get_object($bin);
if (!($obj instanceof DrupalAPCCache)) {
$error = t('The cache class %class for %bin is not DrupalAPCCache.',
array(
'%bin' => $bin,
'%class' => get_class($obj),
)
);
$this->fail($error);
$this->setup = FALSE;
}
}
}
else {
// If the APCu extension is not available, disable the tests.
$error = t('The APCu extension is not loaded or APCu is not enabled for the current environment.');
$this->fail($error);
$this->setup = FALSE;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment