update test for handling subsite specific themes

fixes #309
This commit is contained in:
Werner M. Krauß 2017-09-13 06:13:55 +02:00
parent ea00ac3520
commit e83435b2b6

View File

@ -392,11 +392,20 @@ class SiteTreeSubsitesTest extends BaseSubsiteTest
$controller = ModelAsController::controller_for($pageWithTheme);
SiteTree::singleton()->extend('contentcontrollerInit', $controller);
$subsiteTheme = $pageWithTheme->Subsite()->Theme;
$allThemes = SSViewer::get_themes();
$this->assertContains(
$subsiteTheme,
SSViewer::get_themes(),
$allThemes,
'Themes should be modified when Subsite has theme defined'
);
$this->assertEquals(
$subsiteTheme,
array_shift($allThemes),
'Subsite theme should be prepeded to theme list'
);
}
public function provideAlternateAbsoluteLink()