Skip to content

Commit

Permalink
FIx i18n tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Damian Mooyman committed Jun 20, 2017
1 parent 06364af commit d75a8d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/View/ThemeResourceLoader.php
Expand Up @@ -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.
Expand Down
9 changes: 6 additions & 3 deletions tests/php/i18n/i18nTestManifest.php
Expand Up @@ -82,16 +82,18 @@ public function setupManifest()
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
$this->oldThemeResourceLoader = ThemeResourceLoader::inst();
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',
Expand All @@ -102,7 +104,8 @@ public function setupManifest()
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
Expand Down

0 comments on commit d75a8d1

Please sign in to comment.