Changeset 57298
- Timestamp:
- 01/16/2024 09:32:21 PM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/l10n/wpTextdomainRegistry.php
r57290 r57298 50 50 ); 51 51 $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' ), 53 53 'List of files in custom path not cached' 54 54 ); … … 85 85 */ 86 86 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 ));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 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' ) );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' ) ); 96 96 } 97 97 … … 104 104 remove_filter( 'pre_get_language_files_from_path', '__return_empty_array' ); 105 105 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' ); 107 107 108 108 $this->assertEmpty( $result );
Note: See TracChangeset
for help on using the changeset viewer.