Skip to content

Commit c1491ad

Browse files
committed
Add missing tests for lazy-load script/style functions
1 parent 4d70ad0 commit c1491ad

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

plugins/image-prioritizer/tests/test-helper.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,4 +222,31 @@ public function test_auto_sizes( array $element_metrics, string $buffer, string
222222
"Buffer snapshot:\n$buffer"
223223
);
224224
}
225+
226+
/**
227+
* Test image_prioritizer_get_video_lazy_load_script.
228+
*
229+
* @covers ::image_prioritizer_get_video_lazy_load_script
230+
*/
231+
public function test_image_prioritizer_get_video_lazy_load_script(): void {
232+
$this->assertGreaterThan( 0, strlen( image_prioritizer_get_video_lazy_load_script() ) );
233+
}
234+
235+
/**
236+
* Test image_prioritizer_get_lazy_load_bg_image_script.
237+
*
238+
* @covers ::image_prioritizer_get_lazy_load_bg_image_script
239+
*/
240+
public function test_image_prioritizer_get_lazy_load_bg_image_script(): void {
241+
$this->assertGreaterThan( 0, strlen( image_prioritizer_get_lazy_load_bg_image_script() ) );
242+
}
243+
244+
/**
245+
* Test image_prioritizer_get_lazy_load_bg_image_stylesheet.
246+
*
247+
* @covers ::image_prioritizer_get_lazy_load_bg_image_stylesheet
248+
*/
249+
public function test_image_prioritizer_get_lazy_load_bg_image_stylesheet(): void {
250+
$this->assertGreaterThan( 0, strlen( image_prioritizer_get_lazy_load_bg_image_stylesheet() ) );
251+
}
225252
}

0 commit comments

Comments
 (0)