Refactor L10n for testing

- Moving L10n to L10n\L10n
- Adding constructor information
- Adding to factory
- simplify/speedup tests
This commit is contained in:
Philipp Holzer 2019-07-09 21:44:02 +02:00
parent 966043712f
commit eb024a3718
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
13 changed files with 596 additions and 450 deletions

View file

@ -3,6 +3,7 @@
namespace Friendica\Factory;
use Friendica\App;
use Friendica\Core\L10n\L10n;
use Friendica\Core\Config\Cache\PConfigCache;
use Friendica\Factory;
use Friendica\Util\BasePath;
@ -39,7 +40,10 @@ class DependencyFactory
$logger = Factory\LoggerFactory::create($channel, $database, $config, $profiler);
Factory\LoggerFactory::createDev($channel, $config, $profiler);
$baseURL = new BaseURL($config, $_SERVER);
$l10n = new L10n(L10n::detectLanguage($config->get('system', 'language', 'de')),
$database,
$logger);
return new App($database, $config, $mode, $router, $baseURL, $logger, $profiler, $isBackend);
return new App($database, $config, $mode, $router, $baseURL, $logger, $profiler, $l10n, $isBackend);
}
}