Total Complexity | 3 |
Total Lines | 67 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class ColorpickerSiteConfigExtensionTest extends SapphireTest |
||
11 | { |
||
12 | protected $usesDatabase = true; |
||
13 | |||
14 | /** |
||
15 | * Ensure theme options are returned in the expected format without any excluded values |
||
16 | */ |
||
17 | public function testGetThemeOptionsExcluding() |
||
57 | } |
||
58 | |||
59 | public function testDefaultValuesAreNotWrittenWhenDisabled() |
||
60 | { |
||
61 | SiteConfig::config()->set('enable_theme_color_picker', false); |
||
62 | |||
63 | $siteConfig = SiteConfig::create(); |
||
64 | $siteConfig->write(); |
||
65 | |||
66 | $this->assertEmpty($siteConfig->HeaderBackground, 'Color fields should not be written when disabled'); |
||
67 | } |
||
68 | |||
69 | public function testDefaultValuesAreWrittenWhenEnabled() |
||
77 | } |
||
78 | } |
||
79 |