friendica/tests/src/Core/Cache/MemcacheCacheTest.php

36 lines
697 B
PHP
Raw Normal View History

2018-07-07 20:07:07 +02:00
<?php
namespace Friendica\Test\src\Core\Cache;
use Friendica\Core\Cache\MemcacheCache;
use Friendica\Core\Config\Configuration;
2018-07-07 20:07:07 +02:00
/**
* @requires extension memcache
*/
class MemcacheCacheTest extends MemoryCacheTest
2018-07-07 20:07:07 +02:00
{
protected function getInstance()
{
$configMock = \Mockery::mock(Configuration::class);
$configMock
->shouldReceive('get')
2019-02-17 21:41:45 +01:00
->with('system', 'memcache_host')
->andReturn('localhost');
$configMock
->shouldReceive('get')
2019-02-17 21:41:45 +01:00
->with('system', 'memcache_port')
->andReturn(11211);
$this->cache = new MemcacheCache('localhost', $configMock);
return $this->cache;
2018-07-07 20:07:07 +02:00
}
public function tearDown()
{
$this->cache->clear(false);
2018-07-07 20:07:07 +02:00
parent::tearDown();
}
}