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