]> git.mxchange.org Git - friendica.git/blob - tests/src/Core/Lock/MemcacheCacheLockTest.php
Rename *CacheDriver to *Cache because they don't act as driver anymore
[friendica.git] / tests / src / Core / Lock / MemcacheCacheLockTest.php
1 <?php
2
3
4 namespace Friendica\Test\src\Core\Lock;
5
6 use Friendica\Core\Cache\MemcacheCache;
7 use Friendica\Core\Config\Configuration;
8 use Friendica\Core\Lock\CacheLockDriver;
9
10 /**
11  * @requires extension Memcache
12  */
13 class MemcacheCacheLockTest extends LockTest
14 {
15         protected function getInstance()
16         {
17                 $configMock = \Mockery::mock(Configuration::class);
18
19                 $configMock
20                         ->shouldReceive('get')
21                         ->with('system', 'memcache_host')
22                         ->andReturn('localhost');
23                 $configMock
24                         ->shouldReceive('get')
25                         ->with('system', 'memcache_port')
26                         ->andReturn(11211);
27
28                 return new CacheLockDriver(new MemcacheCache('localhost', $configMock));
29         }
30 }