FIx i18n tests
This commit is contained in:
parent
06364af3c3
commit
d75a8d1d93
|
@ -3,7 +3,6 @@
|
||||||
namespace SilverStripe\View;
|
namespace SilverStripe\View;
|
||||||
|
|
||||||
use SilverStripe\Core\Manifest\ModuleLoader;
|
use SilverStripe\Core\Manifest\ModuleLoader;
|
||||||
use SilverStripe\Dev\Debug;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles finding templates from a stack of template manifest objects.
|
* Handles finding templates from a stack of template manifest objects.
|
||||||
|
|
|
@ -82,7 +82,8 @@ trait i18nTestManifest
|
||||||
Director::config()->update('alternate_base_folder', $this->alternateBasePath);
|
Director::config()->update('alternate_base_folder', $this->alternateBasePath);
|
||||||
|
|
||||||
// New module manifest
|
// New module manifest
|
||||||
$moduleManifest = new ModuleManifest($this->alternateBasePath, false);
|
$moduleManifest = new ModuleManifest($this->alternateBasePath);
|
||||||
|
$moduleManifest->init(true);
|
||||||
$this->pushModuleManifest($moduleManifest);
|
$this->pushModuleManifest($moduleManifest);
|
||||||
|
|
||||||
// Replace old template loader with new one with alternate base path
|
// 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));
|
ThemeResourceLoader::set_instance($loader = new ThemeResourceLoader($this->alternateBasePath));
|
||||||
$loader->addSet(
|
$loader->addSet(
|
||||||
'$default',
|
'$default',
|
||||||
new ThemeManifest($this->alternateBasePath, project(), false)
|
$default = new ThemeManifest($this->alternateBasePath, project())
|
||||||
);
|
);
|
||||||
|
$default->init(true);
|
||||||
|
|
||||||
SSViewer::set_themes([
|
SSViewer::set_themes([
|
||||||
'testtheme1',
|
'testtheme1',
|
||||||
|
@ -102,7 +104,8 @@ trait i18nTestManifest
|
||||||
i18n::set_locale('en_US');
|
i18n::set_locale('en_US');
|
||||||
|
|
||||||
// Set new manifest against the root
|
// Set new manifest against the root
|
||||||
$classManifest = new ClassManifest($this->alternateBasePath, true);
|
$classManifest = new ClassManifest($this->alternateBasePath);
|
||||||
|
$classManifest->init(true);
|
||||||
$this->pushManifest($classManifest);
|
$this->pushManifest($classManifest);
|
||||||
|
|
||||||
// Setup uncached translator
|
// Setup uncached translator
|
||||||
|
|
Loading…
Reference in New Issue