From: Michael Date: Sun, 25 Jul 2021 04:56:40 +0000 (+0000) Subject: Fighting with the tests X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=52378eb298b01655fc5b3f56a561d43fb3720032;p=friendica.git Fighting with the tests --- diff --git a/tests/src/App/ModuleTest.php b/tests/src/App/ModuleTest.php index 9b9bdd0cc3..730d1d8863 100644 --- a/tests/src/App/ModuleTest.php +++ b/tests/src/App/ModuleTest.php @@ -184,6 +184,8 @@ class ModuleTest extends DatabaseTest $cache->shouldReceive('set')->withAnyArgs()->andReturn(false)->atMost()->twice(); $lock = Mockery::mock(ILock::class); + $lock->shouldReceive('acquire')->andReturn(true); + $lock->shouldReceive('isLocked')->andReturn(false); $router = (new App\Router([], __DIR__ . '/../../../static/routes.config.php', $l10n, $cache, $lock)); diff --git a/tests/src/App/RouterTest.php b/tests/src/App/RouterTest.php index 987df5ff9c..3a3c0469b4 100644 --- a/tests/src/App/RouterTest.php +++ b/tests/src/App/RouterTest.php @@ -57,8 +57,8 @@ class RouterTest extends TestCase $this->cache->shouldReceive('set')->andReturn(false); $this->lock = Mockery::mock(ILock::class); - $this->cache->shouldReceive('acquire')->andReturn(true); - $this->cache->shouldReceive('isLocked')->andReturn(false); + $this->lock->shouldReceive('acquire')->andReturn(true); + $this->lock->shouldReceive('isLocked')->andReturn(false); } public function testGetModuleClass()