@@ -231,7 +231,7 @@ public function test_retryable_error_and_error() {
231
231
public function test_duplicated_image () {
232
232
233
233
$ content = wp_get_attachment_image ( self ::$ sample_attachement_upper_case );
234
- $ this ->assertEquals ( "<img width= \" 150 \" height= \" 150 \" src= \"https://example.i.optimole.com/w:150/h:150/q:mauto/rt:fill/g:ce/process: " . self ::$ sample_attachement_upper_case ."/id:579c7f7707ce87caa65fdf50c238a117/http://example.org/1PQ7p-2.jpg \" class= \" attachment-thumbnail size-thumbnail \" alt= \"\" decoding= \" async \" /> " , $ content );
234
+ $ this ->assertStringContainsString ( "src= \"https://example.i.optimole.com/w:150/h:150/q:mauto/rt:fill/g:ce/process: " . self ::$ sample_attachement_upper_case ."/id:579c7f7707ce87caa65fdf50c238a117/http://example.org/1PQ7p-2.jpg \" " , $ content );
235
235
}
236
236
public function test_page_images_process () {
237
237
Optml_Tag_Replacer::$ lazyload_skipped_images = 4 ;
@@ -258,7 +258,7 @@ public function test_page_images_process() {
258
258
)
259
259
);
260
260
$ replaced_content = Optml_Manager::instance ()->replace_content ( $ content );
261
- $ this ->assertEquals ( 3 , substr_count ($ replaced_content , 'https://my_costum_domain ' ));
261
+ $ this ->assertEquals ( 7 , substr_count ($ replaced_content , 'https://my_costum_domain ' ));
262
262
$ this ->assertStringContainsString ( '/w:150/h:150/q:75/rt:fill/g:ce/f:best/id:579c7f7707ce87caa65fdf50c238a117/http://example.org/sample-test.jpg ' , $ replaced_content );
263
263
$ this ->assertStringContainsString ( '/w:150/h:150/q:eco/f:best/id:579c7f7707ce87caa65fdf50c238a117/http://example.org/sample-test.jpg ' , $ replaced_content );
264
264
}
@@ -333,7 +333,7 @@ public function test_custom_post_image_extraction () {
333
333
public function test_special_characters_upload () : void {
334
334
$ special_character_attachment = self ::factory ()->attachment ->create_upload_object ( OPTML_PATH . 'tests/assets/special-characters-•⋿∀.jpg ' );
335
335
$ content = wp_get_attachment_image ( $ special_character_attachment );
336
- $ this ->assertEquals ( "<img width= \" 150 \" height= \" 150 \" src= \"https://example.i.optimole.com/w:150/h:150/q:mauto/rt:fill/g:ce/process: " . $ special_character_attachment ."/id:579c7f7707ce87caa65fdf50c238a117/http://example.org/special-characters-•⋿∀.jpg \" class= \" attachment-thumbnail size-thumbnail \" alt= \"\" decoding= \" async \" /> " , $ content );
336
+ $ this ->assertStringContainsString ( "src= \"https://example.i.optimole.com/w:150/h:150/q:mauto/rt:fill/g:ce/process: " . $ special_character_attachment ."/id:579c7f7707ce87caa65fdf50c238a117/http://example.org/special-characters-•⋿∀.jpg \" " , $ content );
337
337
}
338
338
339
339
/**
0 commit comments