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

@ -4,6 +4,7 @@ namespace Friendica\Test\src\Database;
use Friendica\App;
use Friendica\Core\Config\Cache\PConfigCache;
use Friendica\Core\L10n\L10n;
use Friendica\Database\DBStructure;
use Friendica\Factory;
use Friendica\Model\Config\Config;
@ -24,8 +25,10 @@ class DBStructureTest extends DatabaseTest
$logger = Factory\LoggerFactory::create('test', self::$dba, $config, self::$profiler);
$baseUrl = new BaseURL($config, $_SERVER);
$router = new App\Router();
$this->app = new App(self::$dba, $config, self::$mode, $router, $baseUrl, $logger, self::$profiler, false);
$l10n = new L10n(L10n::detectLanguage($config->get('system', 'language', 'en')),
self::$dba,
$logger);
$this->app = new App(self::$dba, $config, self::$mode, $router, $baseUrl, $logger, self::$profiler, $l10n, false);
parent::setUp();
}