@@ -127,19 +127,30 @@ public function test_fetch_enabled_snippets_scss(): void {
127
127
128
128
$ this ->resetAfterTest ();
129
129
130
+ // Get the SCSS content of all enabled snippets.
130
131
$ scss = snippets::get_enabled_snippet_scss ();
131
132
132
- // No snippets are enabled by default, so the scss should be empty.
133
+ // Builtin snippets are disabled by default as a whole , so the scss should be empty.
133
134
$ this ->assertEquals ('' , $ scss );
134
135
135
- // Enable a snippet directly via the DB.
136
+ // Enable builtin snippets directly via the DB.
137
+ set_config ('enablebuiltinsnippets ' , 'yes ' , 'theme_boost_union ' );
138
+
139
+ // Get the SCSS content of all enabled snippets again.
140
+ $ scss = snippets::get_enabled_snippet_scss ();
141
+
142
+ // No particular builtin snippet is enabled by default, so the scss should still be empty.
143
+ $ this ->assertEquals ('' , $ scss );
144
+
145
+ // Enable a builtin snippet directly via the DB.
136
146
$ snippet = $ DB ->get_record (
137
147
'theme_boost_union_snippets ' ,
138
148
['source ' => 'theme_boost_union ' , 'path ' => 'visual-depth.scss ' ]
139
149
);
140
150
$ snippet ->enabled = 1 ;
141
151
$ DB ->update_record ('theme_boost_union_snippets ' , $ snippet );
142
152
153
+ // Get the SCSS content of all enabled snippets again.
143
154
$ scss = snippets::get_enabled_snippet_scss ();
144
155
145
156
// Verify that the Snippets SCSS content is now queried.
0 commit comments