/** * Creates the required cachestore for the tests to run against Redis. * * @return cachestore_redis */ protected function create_cachestore_redis() { /** @var cache_definition $definition */ $definition = cache_definition::load_adhoc(cache_store::MODE_APPLICATION, 'cachestore_redis', 'phpunit_test'); $store = new cachestore_redis('Test', cachestore_redis::unit_test_configuration()); $store->initialise($definition); $this->store = $store; if (!$store) { $this->markTestSkipped(); } return $store; }