@@ 330-339 (lines=10) @@ | ||
327 | * |
|
328 | * @dataProvider get_dont_process_images_with_classes_data |
|
329 | */ |
|
330 | public function test_dont_process_images_with_classes( $input, $should_skip = true ) { |
|
331 | $instance = Jetpack_Lazy_Images::instance(); |
|
332 | $output = $instance->add_image_placeholders( $input ); |
|
333 | ||
334 | if ( $should_skip ) { |
|
335 | $this->assertNotContains( 'srcset="placeholder.jpg"', $output ); |
|
336 | } else { |
|
337 | $this->assertContains( 'srcset="placeholder.jpg"', $output ); |
|
338 | } |
|
339 | } |
|
340 | ||
341 | /** |
|
342 | * Data provider for test. |
|
@@ 369-378 (lines=10) @@ | ||
366 | * |
|
367 | * @dataProvider get_dont_process_images_with_skip_lazy_data_attribute_data |
|
368 | */ |
|
369 | public function test_dont_process_images_with_skip_lazy_data_attribute( $input, $should_skip = true ) { |
|
370 | $instance = Jetpack_Lazy_Images::instance(); |
|
371 | $output = $instance->add_image_placeholders( $input ); |
|
372 | ||
373 | if ( $should_skip ) { |
|
374 | $this->assertNotContains( 'srcset="placeholder.jpg"', $output ); |
|
375 | } else { |
|
376 | $this->assertContains( 'srcset="placeholder.jpg"', $output ); |
|
377 | } |
|
378 | } |
|
379 | ||
380 | /** |
|
381 | * Data provider for test. |