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