@@ -125,7 +125,7 @@ public function test_tag_add_adjust_to_image_attributes( string $image_path, arr
125
125
126
126
list ( $ src , $ width , $ height ) = wp_get_attachment_image_src ( $ attachment_id );
127
127
// Testing tag_add_adjust() with image being lazy load.
128
- $ filtered_image_mock_lazy_load = sprintf ( '<img loading="lazy" class="test" src="%s" width="%d" height="%d" /> ' , $ src , $ width , $ height );
128
+ $ filtered_image_mock_lazy_load = sprintf ( '<img loading="lazy" class="test" src="%s" width="%d" height="%d" alt="" /> ' , $ src , $ width , $ height );
129
129
130
130
$ filtered_image_tags_added = dominant_color_img_tag_add_dominant_color ( $ filtered_image_mock_lazy_load , 'the_content ' , $ attachment_id );
131
131
@@ -179,11 +179,11 @@ public function test_dominant_color_img_tag_add_dominant_color_requires_proper_q
179
179
public function data_dominant_color_img_tag_add_dominant_color_requires_proper_quotes (): array {
180
180
return array (
181
181
'double quotes ' => array (
182
- 'image ' => '<img src="%s"> ' ,
182
+ 'image ' => '<img src="%s" alt="" > ' ,
183
183
'expected ' => true ,
184
184
),
185
185
'single quotes ' => array (
186
- 'image ' => "<img src='%s'> " ,
186
+ 'image ' => "<img src='%s' alt='' > " ,
187
187
'expected ' => true ,
188
188
),
189
189
);
@@ -222,11 +222,11 @@ public function test_dominant_color_img_tag_add_dominant_color_should_add_domina
222
222
public function data_provider_dominant_color_check_inline_style (): array {
223
223
return array (
224
224
'no existing inline styles ' => array (
225
- 'filtered_image ' => '<img src="%s" width="%d" height="%d" /> ' ,
225
+ 'filtered_image ' => '<img src="%s" width="%d" height="%d" alt="" /> ' ,
226
226
'expected ' => 'style="--dominant-color: #fe0000;" ' ,
227
227
),
228
228
'existing inline styles ' => array (
229
- 'filtered_image ' => '<img style="color: #ffffff;" src="%s" width="%d" height="%d" /> ' ,
229
+ 'filtered_image ' => '<img style="color: #ffffff;" src="%s" width="%d" height="%d" alt="" /> ' ,
230
230
'expected ' => 'style="--dominant-color: #fe0000; color: #ffffff;" ' ,
231
231
),
232
232
);
@@ -298,24 +298,24 @@ public function provider_dominant_color_set_image_editors(): array {
298
298
),
299
299
'filtered ' => array (
300
300
'existing ' => array (
301
- 'WP_Image_Editor_Filered_GD ' ,
302
- 'WP_Image_Editor_Filered_Imagick ' ,
301
+ 'WP_Image_Editor_Filtered_GD ' ,
302
+ 'WP_Image_Editor_Filtered_Imagick ' ,
303
303
),
304
304
'expected ' => array (
305
- 'WP_Image_Editor_Filered_GD ' ,
306
- 'WP_Image_Editor_Filered_Imagick ' ,
305
+ 'WP_Image_Editor_Filtered_GD ' ,
306
+ 'WP_Image_Editor_Filtered_Imagick ' ,
307
307
),
308
308
),
309
309
'added ' => array (
310
310
'existing ' => array (
311
- 'WP_Image_Editor_Filered_GD ' ,
312
- 'WP_Image_Editor_Filered_Imagick ' ,
311
+ 'WP_Image_Editor_Filtered_GD ' ,
312
+ 'WP_Image_Editor_Filtered_Imagick ' ,
313
313
'WP_Image_Editor_GD ' ,
314
314
'WP_Image_Editor_Imagick ' ,
315
315
),
316
316
'expected ' => array (
317
- 'WP_Image_Editor_Filered_GD ' ,
318
- 'WP_Image_Editor_Filered_Imagick ' ,
317
+ 'WP_Image_Editor_Filtered_GD ' ,
318
+ 'WP_Image_Editor_Filtered_Imagick ' ,
319
319
'Dominant_Color_Image_Editor_GD ' ,
320
320
'Dominant_Color_Image_Editor_Imagick ' ,
321
321
),
0 commit comments