fix tests

This commit is contained in:
Yuri Kuznetsov
2020-08-17 13:30:03 +03:00
parent 1aeb5639c7
commit 2f0e0d2a3b
3 changed files with 5 additions and 4 deletions
-3
View File
@@ -77,9 +77,6 @@ class Installer
$this->app = new \Espo\Core\Application();
$user = $this->getEntityManager()->getEntity('User');
$this->app->getContainer()->set('user', $user);
require_once('install/core/InstallerConfig.php');
$this->installerConfig = new InstallerConfig();
+1 -1
View File
@@ -135,7 +135,7 @@ class DataLoader
try {
$config->save();
} catch (\Exception $e) {
throw new \Exception('Erro loadConfig: ' . $e->getMessage());
throw new \Exception('Error loadConfig: ' . $e->getMessage());
}
}
+4
View File
@@ -225,6 +225,8 @@ class Tester
$latestEspoDir = Utils::getLatestBuildedPath($this->buildedPath);
$configData = $this->getTestConfigData();
$configData['siteUrl'] = $mainApplication->getContainer()->get('config')->get('siteUrl') . '/' . $this->installPath;
$this->params['siteUrl'] = $configData['siteUrl'];
@@ -252,9 +254,11 @@ class Tester
require_once('install/core/Installer.php');
$installer = new \Installer();
$installer->saveData(array_merge($configData, [
'language' => 'en_US'
]));
$installer->saveConfig($configData);
$installer = new \Installer(); //reload installer to get all config data