diff --git a/cache/tests/fixtures/lib.php b/cache/tests/fixtures/lib.php index 7b05b2e734a..1bdf7d753c6 100644 --- a/cache/tests/fixtures/lib.php +++ b/cache/tests/fixtures/lib.php @@ -536,6 +536,11 @@ class cache_phpunit_factory extends cache_factory { parent::disable(); } + /** + * @var bool Whether the warning notice about alternative cache store used has been displayed. + */ + protected $altcachestorenotice = false; + /** * Creates a store instance given its name and configuration. * @@ -559,7 +564,15 @@ class cache_phpunit_factory extends cache_factory { return $instance; } } + + // Notify user that alternative store is being used, so action can be taken. + if (!$this->altcachestorenotice) { + echo PHP_EOL . "++ WARNING: " . 'Failed to use "' . $details['plugin'] . '" cache store, alt "' . + $details['alt']['plugin'] . '" cache store is used.' . PHP_EOL . PHP_EOL; + $this->altcachestorenotice = true; + } $details = $details['alt']; + $details['class'] = 'cachestore_'.$details['plugin']; $name = $details['name']; }