]> git.mxchange.org Git - friendica.git/blobdiff - tests/src/Core/Lock/RedisCacheLockTest.php
Merge pull request #10666 from tobiasd/20210905-credits
[friendica.git] / tests / src / Core / Lock / RedisCacheLockTest.php
index b531a5dfe71db31c2faf6ecbd2569f1e13c26c20..360fa74fb2b1a043d7d25542684d6270e4d22d61 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -38,7 +38,7 @@ class RedisCacheLockTest extends LockTest
                $configMock = Mockery::mock(IConfig::class);
 
                $host = $_SERVER['REDIS_HOST'] ?? 'localhost';
-               $port = $_SERVER['REDIS_PORT'] ?? null;
+               $port = $_SERVER['REDIS_PORT'] ?? 6379;
 
                $configMock
                        ->shouldReceive('get')
@@ -52,7 +52,7 @@ class RedisCacheLockTest extends LockTest
                $configMock
                        ->shouldReceive('get')
                        ->with('system', 'redis_db', 0)
-                       ->andReturn(3);
+                       ->andReturn(0);
                $configMock
                        ->shouldReceive('get')
                        ->with('system', 'redis_password')
@@ -64,7 +64,7 @@ class RedisCacheLockTest extends LockTest
                        $cache = new RedisCache($host, $configMock);
                        $lock = new CacheLock($cache);
                } catch (Exception $e) {
-                       static::markTestSkipped('Redis is not available');
+                       static::markTestSkipped('Redis is not available. Error: ' . $e->getMessage());
                }
 
                return $lock;