From: Philipp Holzer Date: Wed, 31 Oct 2018 11:37:01 +0000 (+0100) Subject: Fixing issue L10n::t() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=764e1a3cb69931256bbba48bcd68331ef71690e0;p=friendica.git Fixing issue L10n::t() --- diff --git a/tests/Util/AppMockTrait.php b/tests/Util/AppMockTrait.php index cdd5aedd5d..72c0dc429b 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 bed3a578b6..0430e678c5 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;