From 764e1a3cb69931256bbba48bcd68331ef71690e0 Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Wed, 31 Oct 2018 12:37:01 +0100 Subject: [PATCH] Fixing issue L10n::t() --- tests/Util/AppMockTrait.php | 4 ++-- tests/src/Core/Console/AutomaticInstallationConsoleTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Util/AppMockTrait.php b/tests/Util/AppMockTrait.php index cdd5aedd5..72c0dc429 100644 --- a/tests/Util/AppMockTrait.php +++ b/tests/Util/AppMockTrait.php @@ -27,10 +27,10 @@ trait AppMockTrait */ public function mockApp($root) { - /// @todo This mock is ugly. We return an empty string for each translation - no workaround yet + // simply returning the input when using L10n::t() $l10nMock = \Mockery::mock('alias:Friendica\Core\L10n'); $l10nMock->shouldReceive('t') - ->andReturn(''); + ->andReturnUsing(function ($arg) { return $arg; }); $this->mockConfigGet('system', 'theme', 'testtheme'); diff --git a/tests/src/Core/Console/AutomaticInstallationConsoleTest.php b/tests/src/Core/Console/AutomaticInstallationConsoleTest.php index bed3a578b..0430e678c 100644 --- a/tests/src/Core/Console/AutomaticInstallationConsoleTest.php +++ b/tests/src/Core/Console/AutomaticInstallationConsoleTest.php @@ -168,7 +168,7 @@ Creating config file... Checking database... [Error] -------- -: +Could not connect to database.: FIN;