]> git.mxchange.org Git - friendica.git/blobdiff - tests/src/Core/Lock/SemaphoreLockDriverTest.php
Rename BlockedServers to ServerBlock
[friendica.git] / tests / src / Core / Lock / SemaphoreLockDriverTest.php
index cd4b9157334a1da5119e2adc9d889229ddd7e64d..a37fbffbed24c86a7076fd060216e50b751a84cd 100644 (file)
@@ -2,26 +2,25 @@
 
 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()