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