From d75a8d1d93398af4bd0432df9e4bc6295c15a3fe Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Mon, 19 Jun 2017 17:15:07 +1200 Subject: [PATCH] FIx i18n tests --- src/View/ThemeResourceLoader.php | 1 - tests/php/i18n/i18nTestManifest.php | 9 ++++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/View/ThemeResourceLoader.php b/src/View/ThemeResourceLoader.php index 75d651393..fe3ecf48c 100644 --- a/src/View/ThemeResourceLoader.php +++ b/src/View/ThemeResourceLoader.php @@ -3,7 +3,6 @@ namespace SilverStripe\View; use SilverStripe\Core\Manifest\ModuleLoader; -use SilverStripe\Dev\Debug; /** * Handles finding templates from a stack of template manifest objects. diff --git a/tests/php/i18n/i18nTestManifest.php b/tests/php/i18n/i18nTestManifest.php index 874c39fe5..9e363f3c2 100644 --- a/tests/php/i18n/i18nTestManifest.php +++ b/tests/php/i18n/i18nTestManifest.php @@ -82,7 +82,8 @@ trait i18nTestManifest Director::config()->update('alternate_base_folder', $this->alternateBasePath); // New module manifest - $moduleManifest = new ModuleManifest($this->alternateBasePath, false); + $moduleManifest = new ModuleManifest($this->alternateBasePath); + $moduleManifest->init(true); $this->pushModuleManifest($moduleManifest); // Replace old template loader with new one with alternate base path @@ -90,8 +91,9 @@ trait i18nTestManifest ThemeResourceLoader::set_instance($loader = new ThemeResourceLoader($this->alternateBasePath)); $loader->addSet( '$default', - new ThemeManifest($this->alternateBasePath, project(), false) + $default = new ThemeManifest($this->alternateBasePath, project()) ); + $default->init(true); SSViewer::set_themes([ 'testtheme1', @@ -102,7 +104,8 @@ trait i18nTestManifest i18n::set_locale('en_US'); // Set new manifest against the root - $classManifest = new ClassManifest($this->alternateBasePath, true); + $classManifest = new ClassManifest($this->alternateBasePath); + $classManifest->init(true); $this->pushManifest($classManifest); // Setup uncached translator