From 71f4380dff819f8c33807c09f717717d114c617b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Chans=C3=A9aume?= Date: Fri, 4 Jul 2014 11:27:44 +0200 Subject: [PATCH] added title for all available langages --- core/lib/Thelia/Tests/Action/ContentTest.php | 6 +++++- core/lib/Thelia/Tests/Action/FolderTest.php | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) 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);