Make WordPress Core


Ignore:
Timestamp:
08/08/2022 11:39:06 PM (4 years ago)
Author:
azaozz
Message:

Build/Test Tools: Add @covers tags to the l10n and i18n tests.

Props pbearne, jrf, hellofromTonya, patopaiar, ironprogrammer, antonvlasenko, SergeyBiryukov, costdev.
See #39265.

File:
1 edited

Legend:

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

    r52010 r53866  
    3333        }
    3434
     35        /**
     36         * @covers ::is_textdomain_loaded
     37         */
    3538        public function test_is_textdomain_loaded() {
    3639                $this->assertFalse( is_textdomain_loaded( 'wp-tests-domain' ) );
    3740        }
    3841
     42        /**
     43         * @covers ::unload_textdomain
     44         */
    3945        public function test_unload_textdomain() {
    4046                $this->assertFalse( unload_textdomain( 'wp-tests-domain' ) );
    4147        }
    4248
     49        /**
     50         * @covers ::unload_textdomain
     51         */
    4352        public function test_load_textdomain() {
    4453                $loaded = load_textdomain( 'wp-tests-domain', DIR_TESTDATA . '/pomo/simple.mo' );
    … …  
    4958        }
    5059
     60        /**
     61         * @covers ::unload_textdomain
     62         */
    5163        public function test_is_textdomain_loaded_after_loading() {
    5264                load_textdomain( 'wp-tests-domain', DIR_TESTDATA . '/pomo/simple.mo' );
    … …  
    5971        }
    6072
     73        /**
     74         * @covers ::unload_textdomain
     75         */
    6176        public function test_unload_textdomain_after_loading() {
    6277                load_textdomain( 'wp-tests-domain', DIR_TESTDATA . '/pomo/simple.mo' );
    … …  
    6580        }
    6681
     82        /**
     83         * @covers ::is_textdomain_loaded
     84         */
    6785        public function test_is_textdomain_loaded_after_unloading() {
    6886                load_textdomain( 'wp-tests-domain', DIR_TESTDATA . '/pomo/simple.mo' );
    … …  
    7593        /**
    7694         * @ticket 21319
     95         *
     96         * @covers ::load_textdomain
    7797         */
    7898        public function test_load_textdomain_non_existent_file() {
    … …  
    82102        /**
    83103         * @ticket 21319
     104         *
     105         * @covers ::is_textdomain_loaded
    84106         */
    85107        public function test_is_textdomain_loaded_non_existent_file() {
    … …  
    91113        /**
    92114         * @ticket 21319
     115         *
     116         * @covers ::get_translations_for_domain
    93117         */
    94118        public function test_get_translations_for_domain_non_existent_file() {
    … …  
    100124        /**
    101125         * @ticket 21319
     126         *
     127         * @covers ::unload_textdomain
    102128         */
    103129        public function test_unload_textdomain_non_existent_file() {
    … …  
    109135        /**
    110136         * @ticket 21319
     137         *
     138         * @covers ::is_textdomain_loaded
    111139         */
    112140        public function test_is_textdomain_is_not_loaded_after_gettext_call_with_no_translations() {
    … …  
    116144        }
    117145
     146        /**
     147         * @covers ::load_textdomain
     148         */
    118149        public function test_override_load_textdomain_noop() {
    119150                add_filter( 'override_load_textdomain', '__return_true' );
    … …  
    125156        }
    126157
     158        /**
     159         * @covers ::load_textdomain
     160         */
    127161        public function test_override_load_textdomain_non_existent_mofile() {
    128162                add_filter( 'override_load_textdomain', array( $this, 'override_load_textdomain_filter' ), 10, 3 );
    … …  
    139173        }
    140174
     175        /**
     176         * @covers ::load_textdomain
     177         */
    141178        public function test_override_load_textdomain_custom_mofile() {
    142179                add_filter( 'override_load_textdomain', array( $this, 'override_load_textdomain_filter' ), 10, 3 );
    … …  
    181218        }
    182219
     220        /**
     221         * @covers ::load_muplugin_textdomain
     222         */
    183223        public function test_load_muplugin_textdomain_site_locale() {
    184224                load_muplugin_textdomain( 'wp-tests-domain' );
    … …  
    189229        /**
    190230         * @ticket 38485
     231         *
     232         * @covers ::load_muplugin_textdomain
    191233         */
    192234        public function test_load_muplugin_textdomain_user_locale() {
    … …  
    199241        }
    200242
     243        /**
     244         * @covers ::load_plugin_textdomain
     245         */
    201246        public function test_load_plugin_textdomain_site_locale() {
    202247                load_plugin_textdomain( 'wp-tests-domain' );
    … …  
    207252        /**
    208253         * @ticket 38485
     254         *
     255         * @covers ::load_plugin_textdomain
    209256         */
    210257        public function test_load_plugin_textdomain_user_locale() {
    … …  
    217264        }
    218265
     266        /**
     267         * @covers ::load_theme_textdomain
     268         */
    219269        public function test_load_theme_textdomain_site_locale() {
    220270                load_theme_textdomain( 'wp-tests-domain' );
    … …  
    225275        /**
    226276         * @ticket 38485
     277         *
     278         * @covers ::load_theme_textdomain
    227279         */
    228280        public function test_load_theme_textdomain_user_locale() {
Note: See TracChangeset for help on using the changeset viewer.