namespace Friendica\Test\src\Core\Lock;
-
use Friendica\Core\Lock\SemaphoreLockDriver;
class SemaphoreLockDriverTest extends LockTest
{
- /**
- * @var \Friendica\Core\Lock\SemaphoreLockDriver
- */
- private $semaphoreLockDriver;
-
- protected function getInstance()
+ public function setUp()
{
- $this->semaphoreLockDriver = new SemaphoreLockDriver();
- return $this->semaphoreLockDriver;
+ parent::setUp();
+
+ $this->app->shouldReceive('getHostname')->andReturn('friendica.local');
+
+ $this->configMock
+ ->shouldReceive('get')
+ ->with('system', 'temppath')
+ ->andReturn('/tmp/');
}
- public function tearDown()
+ protected function getInstance()
{
- $this->semaphoreLockDriver->releaseAll();
- parent::tearDown();
+ return new SemaphoreLockDriver();
}
function testLockTTL()