Skip to content

Commit

Permalink
update test for handling subsite specific themes
Browse files Browse the repository at this point in the history
fixes #309
  • Loading branch information
wernerkrauss committed Sep 13, 2017
1 parent ea00ac3 commit e83435b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/php/SiteTreeSubsitesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -392,11 +392,20 @@ public function testIfSubsiteThemeIsSetToThemeList()
$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()
Expand Down

0 comments on commit e83435b

Please sign in to comment.