Make WordPress Core

Changeset 57298


Ignore:
Timestamp:
01/16/2024 09:32:21 PM (16 months ago)
Author:
SergeyBiryukov
Message:

Tests: Remove leftover trailingslashit() calls in WP_Textdomain_Registry tests.

Follow-up to [57287], [57290].

See #58919.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/l10n/wpTextdomainRegistry.php

    r57290 r57298  
    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        );
     
    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 ) );
     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 . '/' );
    9191
    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' ) );
    9696    }
    9797
     
    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 );
Note: See TracChangeset for help on using the changeset viewer.