Skip to content

Commit ced112c

Browse files
committed
Add unit test for hasDarkmode, fix #259
1 parent c43c12a commit ced112c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/Feature/DarkmodeFeatureTest.php

+13
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,19 @@
1212
*/
1313
class DarkmodeFeatureTest extends TestCase
1414
{
15+
public function test_has_darkmode()
16+
{
17+
Config::set('hyde.features', []);
18+
19+
$this->assertFalse(Features::hasDarkmode());
20+
21+
Config::set('hyde.features', [
22+
Features::darkmode(),
23+
]);
24+
25+
$this->assertTrue(Features::hasDarkmode());
26+
}
27+
1528
public function test_layout_has_toggle_button_and_script_when_enabled()
1629
{
1730
Config::set('hyde.features', [

0 commit comments

Comments
 (0)