Make WordPress Core


Ignore:
Timestamp:
11/12/2020 02:41:19 PM (15 months ago)
Author:
ocean90
Message:

I18N: Revert [49236] for now to investigate alternative implementations.

See #39210, #51678, #26511.

File:
1 edited

Legend:

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

    r49236 r49566  
    2525        add_filter( 'plugin_locale', array( $this, 'store_locale' ) );
    2626        add_filter( 'theme_locale', array( $this, 'store_locale' ) );
    27 
    28         /** @var WP_Textdomain_Registry $wp_textdomain_registry */
    29         global $wp_textdomain_registry;
    30 
    31         $wp_textdomain_registry->reset();
    3227    }
    3328
     
    3631        remove_filter( 'theme_locale', array( $this, 'store_locale' ) );
    3732
    38         /** @var WP_Textdomain_Registry $wp_textdomain_registry */
    39         global $wp_textdomain_registry;
    40 
    41         $wp_textdomain_registry->reset();
    42 
    4333        parent::tearDown();
    4434    }
     
    127117     * @ticket 21319
    128118     */
    129     public function test_is_textdomain_is_not_loaded_after_gettext_call_with_no_translations() {
     119    function test_is_textdomain_is_not_loaded_after_gettext_call_with_no_translations() {
    130120        $this->assertFalse( is_textdomain_loaded( 'wp-tests-domain' ) );
    131121        __( 'just some string', 'wp-tests-domain' );
     
    133123    }
    134124
    135     public function test_override_load_textdomain_noop() {
     125    function test_override_load_textdomain_noop() {
    136126        add_filter( 'override_load_textdomain', '__return_true' );
    137127        $load_textdomain = load_textdomain( 'wp-tests-domain', DIR_TESTDATA . '/non-existent-file' );
     
    142132    }
    143133
    144     public function test_override_load_textdomain_non_existent_mofile() {
     134    function test_override_load_textdomain_non_existent_mofile() {
    145135        add_filter( 'override_load_textdomain', array( $this, '_override_load_textdomain_filter' ), 10, 3 );
    146136        $load_textdomain = load_textdomain( 'wp-tests-domain', WP_LANG_DIR . '/non-existent-file.mo' );
     
    156146    }
    157147
    158     public function test_override_load_textdomain_custom_mofile() {
     148    function test_override_load_textdomain_custom_mofile() {
    159149        add_filter( 'override_load_textdomain', array( $this, '_override_load_textdomain_filter' ), 10, 3 );
    160150        $load_textdomain = load_textdomain( 'wp-tests-domain', WP_LANG_DIR . '/plugins/internationalized-plugin-de_DE.mo' );
     
    176166     * @return bool
    177167     */
    178     public function _override_load_textdomain_filter( $override, $domain, $file ) {
     168    function _override_load_textdomain_filter( $override, $domain, $file ) {
    179169        global $l10n;
    180170
Note: See TracChangeset for help on using the changeset viewer.