]> git.mxchange.org Git - friendica.git/commitdiff
Fixing issue L10n::t()
authorPhilipp Holzer <admin@philipp.info>
Wed, 31 Oct 2018 11:37:01 +0000 (12:37 +0100)
committerPhilipp Holzer <admin@philipp.info>
Wed, 31 Oct 2018 11:37:52 +0000 (12:37 +0100)
tests/Util/AppMockTrait.php
tests/src/Core/Console/AutomaticInstallationConsoleTest.php

index cdd5aedd5d890a733ec64a0b8e8272422827fae5..72c0dc429bf0035764338744c390f4335b64edcf 100644 (file)
@@ -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');
 
index bed3a578b6e40cda64c10b428dd5b21b4ecc1e21..0430e678c5fe227f00d5ac427c8b883083187d61 100644 (file)
@@ -168,7 +168,7 @@ Creating config file...
 Checking database...
 
 [Error] --------
-: 
+Could not connect to database.
 
 
 FIN;