File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
packages/framework/tests/Feature Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 99use Hyde \Testing \TestCase ;
1010use Illuminate \Support \Facades \Config ;
1111
12+ use function config ;
13+
1214/**
1315 * @covers \Hyde\Facades\Features
1416 */
@@ -97,6 +99,28 @@ public function testToArrayMethodContainsAllSettingsIncludingFalseValues()
9799 ], (new Features )->toArray ());
98100 }
99101
102+ public function testSerializedClassState ()
103+ {
104+ config (['hyde.features ' => [
105+ Features::htmlPages (),
106+ Features::markdownPosts (),
107+ Features::bladePages (),
108+ ]]);
109+
110+ $ this ->assertSame (<<<'JSON'
111+ {
112+ "html-pages": true,
113+ "markdown-posts": true,
114+ "blade-pages": true,
115+ "markdown-pages": false,
116+ "documentation-pages": false,
117+ "darkmode": false,
118+ "documentation-search": false,
119+ "torchlight": false
120+ }
121+ JSON, (new Features )->toJson (JSON_PRETTY_PRINT ));
122+ }
123+
100124 public function testFeaturesCanBeMocked ()
101125 {
102126 Features::mock ('darkmode ' , true );
You can’t perform that action at this time.
0 commit comments