]> git.mxchange.org Git - friendica.git/blobdiff - tests/src/Core/Lock/SemaphoreLockDriverTest.php
Bugfix ConfigCacheLoaderTest
[friendica.git] / tests / src / Core / Lock / SemaphoreLockDriverTest.php
index 56c96458f2a2e9110df3ddc2812c2d3c6ca9801d..a37fbffbed24c86a7076fd060216e50b751a84cd 100644 (file)
@@ -2,25 +2,30 @@
 
 namespace Friendica\Test\src\Core\Lock;
 
-
 use Friendica\Core\Lock\SemaphoreLockDriver;
 
 class SemaphoreLockDriverTest extends LockTest
 {
-       /**
-        * @var \Friendica\Core\Lock\SemaphoreLockDriver
-        */
-       private $semaphoreLockDriver;
+       public function setUp()
+       {
+               parent::setUp();
+
+               $this->app->shouldReceive('getHostname')->andReturn('friendica.local');
+
+               $this->configMock
+                       ->shouldReceive('get')
+                       ->with('system', 'temppath')
+                       ->andReturn('/tmp/');
+       }
 
        protected function getInstance()
        {
-               $this->semaphoreLockDriver = new SemaphoreLockDriver();
-               return $this->semaphoreLockDriver;
+               return new SemaphoreLockDriver();
        }
 
-       public function tearDown()
+       function testLockTTL()
        {
-               $this->semaphoreLockDriver->releaseAll();
-               parent::tearDown();
+               // Semaphore doesn't work with TTL
+               return true;
        }
-}
\ No newline at end of file
+}