|
@@ 300-309 (lines=10) @@
|
| 297 |
|
* |
| 298 |
|
* @dataProvider get_dont_process_images_with_classes_data |
| 299 |
|
*/ |
| 300 |
|
public function test_dont_process_images_with_classes( $input, $should_skip = true ) { |
| 301 |
|
$instance = Jetpack_Lazy_Images::instance(); |
| 302 |
|
$output = $instance->add_image_placeholders( $input ); |
| 303 |
|
|
| 304 |
|
if ( $should_skip ) { |
| 305 |
|
$this->assertStringNotContainsString( 'srcset="placeholder.jpg"', $output ); |
| 306 |
|
} else { |
| 307 |
|
$this->assertStringContainsString( 'srcset="placeholder.jpg"', $output ); |
| 308 |
|
} |
| 309 |
|
} |
| 310 |
|
|
| 311 |
|
/** |
| 312 |
|
* Data provider for test. |
|
@@ 339-348 (lines=10) @@
|
| 336 |
|
* |
| 337 |
|
* @dataProvider get_dont_process_images_with_skip_lazy_data_attribute_data |
| 338 |
|
*/ |
| 339 |
|
public function test_dont_process_images_with_skip_lazy_data_attribute( $input, $should_skip = true ) { |
| 340 |
|
$instance = Jetpack_Lazy_Images::instance(); |
| 341 |
|
$output = $instance->add_image_placeholders( $input ); |
| 342 |
|
|
| 343 |
|
if ( $should_skip ) { |
| 344 |
|
$this->assertStringNotContainsString( 'srcset="placeholder.jpg"', $output ); |
| 345 |
|
} else { |
| 346 |
|
$this->assertStringContainsString( 'srcset="placeholder.jpg"', $output ); |
| 347 |
|
} |
| 348 |
|
} |
| 349 |
|
|
| 350 |
|
/** |
| 351 |
|
* Data provider for test. |