@@ -38,12 +38,12 @@ final class snippets_test extends advanced_testcase {
38
38
* @return void
39
39
*/
40
40
public function test_parse_snippet_header (): void {
41
- $ meta = snippets::get_snippet_meta ('visual-depth .scss ' , 'theme_boost_union ' );
41
+ $ meta = snippets::get_snippet_meta ('visual_depth .scss ' , 'theme_boost_union ' );
42
42
$ this ->assertEquals ('Visual depth ' , $ meta ->title );
43
43
$ this ->assertEquals ('global ' , $ meta ->scope );
44
44
$ this ->assertEquals ('eyecandy ' , $ meta ->goal );
45
45
$ this ->assertEquals (
46
- 'A less flat design than is intended in the Boost theme. Realised by ' .
46
+ 'A less flat design than the original Boost theme. Realized with ' .
47
47
'box-shadows on a number of page elements and a colour gradient on the page background. ' ,
48
48
$ meta ->description
49
49
);
@@ -80,7 +80,7 @@ public function test_register_builtin_snippets(): void {
80
80
// Delete one snippet from the database.
81
81
$ DB ->delete_records (
82
82
'theme_boost_union_snippets ' ,
83
- ['source ' => 'theme_boost_union ' , 'path ' => 'visual-depth .scss ' ]
83
+ ['source ' => 'theme_boost_union ' , 'path ' => 'visual_depth .scss ' ]
84
84
);
85
85
86
86
$ count = $ DB ->count_records (
@@ -96,7 +96,7 @@ public function test_register_builtin_snippets(): void {
96
96
// The builtin snippet which was just deleted from the db should be registered again.
97
97
$ snippet = $ DB ->get_record (
98
98
'theme_boost_union_snippets ' ,
99
- ['source ' => 'theme_boost_union ' , 'path ' => 'visual-depth .scss ' ]
99
+ ['source ' => 'theme_boost_union ' , 'path ' => 'visual_depth .scss ' ]
100
100
);
101
101
102
102
$ this ->assertNotEmpty ($ snippet );
@@ -145,7 +145,7 @@ public function test_fetch_enabled_snippets_scss(): void {
145
145
// Enable a builtin snippet directly via the DB.
146
146
$ snippet = $ DB ->get_record (
147
147
'theme_boost_union_snippets ' ,
148
- ['source ' => 'theme_boost_union ' , 'path ' => 'visual-depth .scss ' ]
148
+ ['source ' => 'theme_boost_union ' , 'path ' => 'visual_depth .scss ' ]
149
149
);
150
150
$ snippet ->enabled = 1 ;
151
151
$ DB ->update_record ('theme_boost_union_snippets ' , $ snippet );
@@ -168,9 +168,9 @@ public function test_fetch_enabled_snippets_scss(): void {
168
168
public function test_lookup_visual_preview_file (): void {
169
169
global $ CFG ;
170
170
171
- $ file = snippets::get_snippet_preview_url ('international_day_against_homophobia .scss ' , 'theme_boost_union ' );
171
+ $ file = snippets::get_snippet_preview_url ('rainbow_navbar .scss ' , 'theme_boost_union ' );
172
172
173
173
// Check that indeed the present webp preview for this snippet is returned.
174
- $ this ->assertEquals ($ CFG ->wwwroot . '/theme/boost_union/snippets/builtin/international_day_against_homophobia .webp ' , $ file );
174
+ $ this ->assertEquals ($ CFG ->wwwroot . '/theme/boost_union/snippets/builtin/rainbow_navbar .webp ' , $ file );
175
175
}
176
176
}
0 commit comments