]> git.mxchange.org Git - friendica.git/blobdiff - tests/src/Core/Lock/RedisCacheLockTest.php
Merge pull request #11195 from annando/issue-10966
[friendica.git] / tests / src / Core / Lock / RedisCacheLockTest.php
index c373747bdca8c45356f9b4f46ca54e20f1ed9b9c..cc0184bb83b5b1136d709206546923f9266b18b6 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -22,9 +22,9 @@
 namespace Friendica\Test\src\Core\Lock;
 
 use Exception;
-use Friendica\Core\Cache\RedisCache;
-use Friendica\Core\Config\IConfig;
-use Friendica\Core\Lock\CacheLock;
+use Friendica\Core\Cache\Type\RedisCache;
+use Friendica\Core\Config\Capability\IManageConfigValues;
+use Friendica\Core\Lock\Type\CacheLock;
 use Mockery;
 
 /**
@@ -35,7 +35,7 @@ class RedisCacheLockTest extends LockTest
 {
        protected function getInstance()
        {
-               $configMock = Mockery::mock(IConfig::class);
+               $configMock = Mockery::mock(IManageConfigValues::class);
 
                $host = $_SERVER['REDIS_HOST'] ?? 'localhost';
                $port = $_SERVER['REDIS_PORT'] ?? 6379;
@@ -62,9 +62,9 @@ class RedisCacheLockTest extends LockTest
 
                try {
                        $cache = new RedisCache($host, $configMock);
-                       $lock = new CacheLock($cache);
+                       $lock = new \Friendica\Core\Lock\Type\CacheLock($cache);
                } catch (Exception $e) {
-                       static::markTestSkipped('Redis is not available');
+                       static::markTestSkipped('Redis is not available. Error: ' . $e->getMessage());
                }
 
                return $lock;