- if (class_exists('Memcache')) {
- try {
- $this->cache = CacheDriverFactory::create('memcache');
- } catch (\Exception $exception) {
- print "Memcache - TestCase failed: " . $exception->getMessage();
- throw new \Exception();
- }
- return new CacheLockDriver($this->cache);
- } else {
- $this->markTestSkipped('Memcache driver isn\'t available');
- return null;
- }
- }
+ $this->configMock
+ ->shouldReceive('get')
+ ->with('system', 'memcache_host')
+ ->andReturn('localhost');