@@ -49,7 +49,7 @@ public function test_set_custom_path() {
4949 'Custom path for textdomain not returned '
5050 );
5151 $ this ->assertNotFalse (
52- wp_cache_get ( 'cached_mo_files_ ' . md5 ( trailingslashit ( WP_LANG_DIR ) . 'bar/ ' ), 'translations ' ),
52+ wp_cache_get ( 'cached_mo_files_ ' . md5 ( WP_LANG_DIR . '/ bar/ ' ), 'translations ' ),
5353 'List of files in custom path not cached '
5454 );
5555 }
@@ -84,15 +84,15 @@ public function test_set_populates_cache() {
8484 * @covers ::get_language_files_from_path
8585 */
8686 public function test_get_language_files_from_path_caches_results () {
87- $ this ->instance ->get_language_files_from_path ( trailingslashit ( WP_LANG_DIR ) . 'foobar/ ' );
88- $ this ->instance ->get_language_files_from_path ( trailingslashit ( WP_LANG_DIR ) . 'plugins/ ' );
89- $ this ->instance ->get_language_files_from_path ( trailingslashit ( WP_LANG_DIR ) . 'themes/ ' );
90- $ this ->instance ->get_language_files_from_path ( trailingslashit ( WP_LANG_DIR ) );
91-
92- $ this ->assertNotFalse ( wp_cache_get ( 'cached_mo_files_ ' . md5 ( trailingslashit ( WP_LANG_DIR ) . 'plugins/ ' ), 'translations ' ) );
93- $ this ->assertNotFalse ( wp_cache_get ( 'cached_mo_files_ ' . md5 ( trailingslashit ( WP_LANG_DIR ) . 'themes/ ' ), 'translations ' ) );
94- $ this ->assertNotFalse ( wp_cache_get ( 'cached_mo_files_ ' . md5 ( trailingslashit ( WP_LANG_DIR ) . 'foobar/ ' ), 'translations ' ) );
95- $ this ->assertNotFalse ( wp_cache_get ( 'cached_mo_files_ ' . md5 ( trailingslashit ( WP_LANG_DIR ) ), 'translations ' ) );
87+ $ this ->instance ->get_language_files_from_path ( WP_LANG_DIR . '/ foobar/ ' );
88+ $ this ->instance ->get_language_files_from_path ( WP_LANG_DIR . '/ plugins/ ' );
89+ $ this ->instance ->get_language_files_from_path ( WP_LANG_DIR . '/ themes/ ' );
90+ $ this ->instance ->get_language_files_from_path ( WP_LANG_DIR . ' / ' );
91+
92+ $ this ->assertNotFalse ( wp_cache_get ( 'cached_mo_files_ ' . md5 ( WP_LANG_DIR . '/ plugins/ ' ), 'translations ' ) );
93+ $ this ->assertNotFalse ( wp_cache_get ( 'cached_mo_files_ ' . md5 ( WP_LANG_DIR . '/ themes/ ' ), 'translations ' ) );
94+ $ this ->assertNotFalse ( wp_cache_get ( 'cached_mo_files_ ' . md5 ( WP_LANG_DIR . '/ foobar/ ' ), 'translations ' ) );
95+ $ this ->assertNotFalse ( wp_cache_get ( 'cached_mo_files_ ' . md5 ( WP_LANG_DIR . ' / ' ), 'translations ' ) );
9696 }
9797
9898 /**
@@ -103,7 +103,7 @@ public function test_get_language_files_from_path_short_circuit() {
103103 $ result = $ this ->instance ->get_language_files_from_path ( WP_LANG_DIR . '/plugins ' );
104104 remove_filter ( 'pre_get_language_files_from_path ' , '__return_empty_array ' );
105105
106- $ cache = wp_cache_get ( 'cached_mo_files_ ' . md5 ( WP_LANG_DIR . 'plugins ' ), 'translations ' );
106+ $ cache = wp_cache_get ( 'cached_mo_files_ ' . md5 ( WP_LANG_DIR . '/ plugins ' ), 'translations ' );
107107
108108 $ this ->assertEmpty ( $ result );
109109 $ this ->assertFalse ( $ cache );
0 commit comments