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

36 lines
619 B
PHP
Raw Normal View History

2018-07-07 20:07:07 +02:00
<?php
namespace Friendica\Test\src\Core\Cache;
2019-03-03 15:41:14 +01:00
use Friendica\Factory\CacheDriverFactory;
2018-07-07 20:07:07 +02:00
/**
* @requires extension memcache
*/
2018-07-07 20:35:42 +02:00
class MemcacheCacheDriverTest extends MemoryCacheTest
2018-07-07 20:07:07 +02:00
{
protected function getInstance()
{
2019-02-17 21:41:45 +01:00
$this->configMock
->shouldReceive('get')
2019-02-17 21:41:45 +01:00
->with('system', 'memcache_host')
->andReturn('localhost');
2019-02-17 21:41:45 +01:00
$this->configMock
->shouldReceive('get')
2019-02-17 21:41:45 +01:00
->with('system', 'memcache_port')
->andReturn(11211);
$this->cache = CacheDriverFactory::create('memcache');
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();
}
}