fix tests
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user