diff --git a/core/lib/Thelia/Tests/Action/ContentTest.php b/core/lib/Thelia/Tests/Action/ContentTest.php index 4417cd7ea..dfbabb21a 100644 --- a/core/lib/Thelia/Tests/Action/ContentTest.php +++ b/core/lib/Thelia/Tests/Action/ContentTest.php @@ -22,6 +22,7 @@ use Thelia\Core\Event\Content\ContentRemoveFolderEvent; use Thelia\Core\Event\Content\ContentToggleVisibilityEvent; use Thelia\Core\Event\Content\ContentUpdateEvent; use Thelia\Core\Event\UpdatePositionEvent; +use Thelia\Model\LangQuery; use Thelia\Model\ContentFolder; use Thelia\Model\ContentFolderQuery; use Thelia\Model\ContentQuery; @@ -359,7 +360,10 @@ class ContentTest extends TestCaseWithURLToolSetup public function setI18N(&$object, $title) { - $localeList = array('fr_FR', 'en_US', 'es_ES', 'it_IT'); + $localeList = LangQuery::create() + ->select("Locale") + ->find() + ->toArray(); foreach ($localeList as $locale) { $object->setLocale($locale); diff --git a/core/lib/Thelia/Tests/Action/FolderTest.php b/core/lib/Thelia/Tests/Action/FolderTest.php index cc29c3e93..3b2401159 100644 --- a/core/lib/Thelia/Tests/Action/FolderTest.php +++ b/core/lib/Thelia/Tests/Action/FolderTest.php @@ -21,6 +21,7 @@ use Thelia\Core\Event\Folder\FolderUpdateEvent; use Thelia\Core\Event\UpdatePositionEvent; use Thelia\Core\Event\UpdateSeoEvent; use Thelia\Model\FolderQuery; +use Thelia\Model\LangQuery; use Thelia\Model\Map\FolderTableMap; use Thelia\Tests\TestCaseWithURLToolSetup; @@ -330,7 +331,10 @@ class FolderTest extends TestCaseWithURLToolSetup public function setI18N(&$object, $title) { - $localeList = array('fr_FR', 'en_US', 'es_ES', 'it_IT'); + $localeList = LangQuery::create() + ->select("Locale") + ->find() + ->toArray(); foreach ($localeList as $locale) { $object->setLocale($locale);