From 2f0e0d2a3b58b998057cf714b8a0a9f2cce36845 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Mon, 17 Aug 2020 13:30:03 +0300 Subject: [PATCH] fix tests --- install/core/Installer.php | 3 --- tests/integration/Core/DataLoader.php | 2 +- tests/integration/Core/Tester.php | 4 ++++ 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/install/core/Installer.php b/install/core/Installer.php index 57e9bd14f8..61ecd16ede 100644 --- a/install/core/Installer.php +++ b/install/core/Installer.php @@ -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(); diff --git a/tests/integration/Core/DataLoader.php b/tests/integration/Core/DataLoader.php index 6dceecbb0e..f388850f5d 100644 --- a/tests/integration/Core/DataLoader.php +++ b/tests/integration/Core/DataLoader.php @@ -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()); } } diff --git a/tests/integration/Core/Tester.php b/tests/integration/Core/Tester.php index 2e60b0ff35..f32d943362 100644 --- a/tests/integration/Core/Tester.php +++ b/tests/integration/Core/Tester.php @@ -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