File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,12 @@ class Optml_Attachment_Cache {
11
11
* @var array
12
12
*/
13
13
private static $ cache_map = [];
14
-
14
+ /**
15
+ * Reset the memory cache.
16
+ */
17
+ public static function reset () {
18
+ self ::$ cache_map = [];
19
+ }
15
20
/**
16
21
* Get the cached attachment ID.
17
22
*
Original file line number Diff line number Diff line change @@ -418,6 +418,7 @@ public function test_replace_alternative_domain(){
418
418
$ this ->assertEquals ( $ this ->attachment_url_to_post_id ( $ scaled_url ), self ::$ sample_attachment_scaled );
419
419
}
420
420
public function test_replace_urls_in_editor_content () {
421
+ Optml_Attachment_Cache::reset ();
421
422
// Sample attachment:
422
423
$ original_url = Optml_Media_Offload::get_original_url ( self ::$ sample_attachement );
423
424
$ extension = pathinfo ( $ original_url , PATHINFO_EXTENSION );
You can’t perform that action at this time.
0 commit comments