FIx i18n tests

This commit is contained in:
Damian Mooyman 2017-06-19 17:15:07 +12:00
parent 06364af3c3
commit d75a8d1d93
2 changed files with 6 additions and 4 deletions

View File

@ -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.

View File

@ -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