Refactor ConfigMockTrait to mocked ConfigCache

This commit is contained in:
Philipp Holzer 2019-02-07 20:44:03 +01:00
parent 38ac615ba0
commit cb791024e4
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
27 changed files with 244 additions and 193 deletions

View file

@ -4,10 +4,6 @@ namespace Friendica\Test\src\Core\Lock;
use Friendica\Core\Lock\SemaphoreLockDriver;
/**
* @runTestsInSeparateProcesses
* @preserveGlobalState disabled
*/
class SemaphoreLockDriverTest extends LockTest
{
public function setUp()
@ -15,7 +11,11 @@ class SemaphoreLockDriverTest extends LockTest
parent::setUp();
$this->app->shouldReceive('getHostname')->andReturn('friendica.local');
$this->mockConfigGet('system', 'temppath', '/tmp/');
$this->configCache
->shouldReceive('get')
->with('system', 'temppath', NULL)
->andReturn('/tmp/');
}
protected function getInstance()