mirror of
https://github.com/friendica/friendica
synced 2025-05-04 09:04:11 +02:00
Fixing tests
This commit is contained in:
parent
5e5c39b0e1
commit
f5adbd268b
18 changed files with 101 additions and 93 deletions
|
@ -27,8 +27,7 @@ abstract class LockTest extends MockedTest
|
|||
{
|
||||
// Reusable App object
|
||||
$this->setUpVfsDir();
|
||||
$configMock = \Mockery::mock('Friendica\Core\Config\Configuration');
|
||||
$this->mockApp($this->root, $configMock);
|
||||
$this->mockApp($this->root);
|
||||
$this->app
|
||||
->shouldReceive('getHostname')
|
||||
->andReturn('friendica.local');
|
||||
|
|
|
@ -13,14 +13,14 @@ class MemcacheCacheLockDriverTest extends LockTest
|
|||
{
|
||||
protected function getInstance()
|
||||
{
|
||||
$this->configCache
|
||||
$this->configMock
|
||||
->shouldReceive('get')
|
||||
->with('system', 'memcache_host', NULL, false)
|
||||
->with('system', 'memcache_host')
|
||||
->andReturn('localhost');
|
||||
|
||||
$this->configCache
|
||||
$this->configMock
|
||||
->shouldReceive('get')
|
||||
->with('system', 'memcache_port', NULL, false)
|
||||
->with('system', 'memcache_port')
|
||||
->andReturn(11211);
|
||||
|
||||
return new CacheLockDriver(CacheDriverFactory::create('memcache'));
|
||||
|
|
|
@ -13,9 +13,9 @@ class MemcachedCacheLockDriverTest extends LockTest
|
|||
{
|
||||
protected function getInstance()
|
||||
{
|
||||
$this->configCache
|
||||
$this->configMock
|
||||
->shouldReceive('get')
|
||||
->with('system', 'memcached_hosts', NULL, false)
|
||||
->with('system', 'memcached_hosts')
|
||||
->andReturn([0 => 'localhost, 11211']);
|
||||
|
||||
return new CacheLockDriver(CacheDriverFactory::create('memcached'));
|
||||
|
|
|
@ -13,14 +13,14 @@ class RedisCacheLockDriverTest extends LockTest
|
|||
{
|
||||
protected function getInstance()
|
||||
{
|
||||
$this->configCache
|
||||
$this->configMock
|
||||
->shouldReceive('get')
|
||||
->with('system', 'redis_host', NULL, false)
|
||||
->with('system', 'redis_host')
|
||||
->andReturn('localhost');
|
||||
|
||||
$this->configCache
|
||||
$this->configMock
|
||||
->shouldReceive('get')
|
||||
->with('system', 'redis_port', NULL, false)
|
||||
->with('system', 'redis_port')
|
||||
->andReturn(null);
|
||||
|
||||
return new CacheLockDriver(CacheDriverFactory::create('redis'));
|
||||
|
|
|
@ -12,9 +12,9 @@ class SemaphoreLockDriverTest extends LockTest
|
|||
|
||||
$this->app->shouldReceive('getHostname')->andReturn('friendica.local');
|
||||
|
||||
$this->configCache
|
||||
$this->configMock
|
||||
->shouldReceive('get')
|
||||
->with('system', 'temppath', NULL, false)
|
||||
->with('system', 'temppath')
|
||||
->andReturn('/tmp/');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue