File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -401,12 +401,11 @@ public function test_filter_saved_data() {
401
401
$ this ->assertStringContainsString ('300x300.jpg ' , $ replaced ['post_content ' ] );
402
402
}
403
403
public function test_replace_alternative_domain (){
404
-
405
-
406
- $ url = Optml_Media_Offload::get_original_url ( self ::$ sample_attachement );
407
- $ this ->assertEquals ( $ this ->attachment_url_to_post_id ( $ url ), self ::$ sample_attachement );
404
+ $ attachment = self ::factory ()->attachment ->create_upload_object ( OPTML_PATH . 'tests/assets/ ' .self ::$ files [0 ].'.jpg ' );
405
+ $ url = Optml_Media_Offload::get_original_url ( $ attachment );
406
+ $ this ->assertEquals ( $ this ->attachment_url_to_post_id ( $ url ), $ attachment );
408
407
$ url = str_replace ('example.org ' , 'www.example.org ' , $ url );
409
- $ this ->assertEquals ( $ this ->attachment_url_to_post_id ( $ url ), self :: $ sample_attachement );
408
+ $ this ->assertEquals ( $ this ->attachment_url_to_post_id ( $ url ), $ attachment );
410
409
411
410
$ scaled_url = Optml_Media_Offload::get_original_url ( self ::$ sample_attachment_scaled );
412
411
You can’t perform that action at this time.
0 commit comments