Skip to content

Commit

Permalink
fix integration test issue
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieu-rolland committed Aug 24, 2021
1 parent ab0d4cf commit 7274cf1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/PrestaShopBundle/Install/Install.php
Expand Up @@ -368,7 +368,6 @@ public function initializeTestContext()
$this->language->setLanguage('en');
$context = Context::getContext();
$context->shop = new Shop(1);
Shop::setContext(Shop::CONTEXT_SHOP, 1);
Configuration::loadConfiguration();
if (!isset($context->language) || !Validate::isLoadedObject($context->language)) {
$context->language = new Language('en');
Expand Down
3 changes: 3 additions & 0 deletions tests-legacy/PrestaShopBundle/Utils/DatabaseCreator.php
Expand Up @@ -32,9 +32,11 @@
use Language;
use PrestaShopBundle\Install\DatabaseDump;
use PrestaShopBundle\Install\Install;
use Shop;
use Tests\Resources\ResourceResetter;
use Tab;


class DatabaseCreator
{
/**
Expand All @@ -49,6 +51,7 @@ public static function createTestDB()
require_once __DIR__ . '/../../../install-dev/init.php';

$install = new Install();
Shop::setContext(Shop::CONTEXT_SHOP, 1);
$install->setTranslator(Context::getContext()->getTranslatorFromLocale('en'));
\DbPDOCore::createDatabase(_DB_SERVER_, _DB_USER_, _DB_PASSWD_, _DB_NAME_, false);
$install->clearDatabase(false);
Expand Down

0 comments on commit 7274cf1

Please sign in to comment.