Changeset 52010 for trunk/tests/phpunit/tests/l10n/loadTextdomain.php
- Timestamp:
- 11/04/2021 03:22:47 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/l10n/loadTextdomain.php
r51568 r52010 110 110 * @ticket 21319 111 111 */ 112 function test_is_textdomain_is_not_loaded_after_gettext_call_with_no_translations() {112 public function test_is_textdomain_is_not_loaded_after_gettext_call_with_no_translations() { 113 113 $this->assertFalse( is_textdomain_loaded( 'wp-tests-domain' ) ); 114 114 __( 'just some string', 'wp-tests-domain' ); … … 116 116 } 117 117 118 function test_override_load_textdomain_noop() {118 public function test_override_load_textdomain_noop() { 119 119 add_filter( 'override_load_textdomain', '__return_true' ); 120 120 $load_textdomain = load_textdomain( 'wp-tests-domain', DIR_TESTDATA . '/non-existent-file' ); … … 125 125 } 126 126 127 function test_override_load_textdomain_non_existent_mofile() {128 add_filter( 'override_load_textdomain', array( $this, ' _override_load_textdomain_filter' ), 10, 3 );127 public function test_override_load_textdomain_non_existent_mofile() { 128 add_filter( 'override_load_textdomain', array( $this, 'override_load_textdomain_filter' ), 10, 3 ); 129 129 $load_textdomain = load_textdomain( 'wp-tests-domain', WP_LANG_DIR . '/non-existent-file.mo' ); 130 remove_filter( 'override_load_textdomain', array( $this, ' _override_load_textdomain_filter' ) );130 remove_filter( 'override_load_textdomain', array( $this, 'override_load_textdomain_filter' ) ); 131 131 132 132 $is_textdomain_loaded = is_textdomain_loaded( 'wp-tests-domain' ); … … 139 139 } 140 140 141 function test_override_load_textdomain_custom_mofile() {142 add_filter( 'override_load_textdomain', array( $this, ' _override_load_textdomain_filter' ), 10, 3 );141 public function test_override_load_textdomain_custom_mofile() { 142 add_filter( 'override_load_textdomain', array( $this, 'override_load_textdomain_filter' ), 10, 3 ); 143 143 $load_textdomain = load_textdomain( 'wp-tests-domain', WP_LANG_DIR . '/plugins/internationalized-plugin-de_DE.mo' ); 144 remove_filter( 'override_load_textdomain', array( $this, ' _override_load_textdomain_filter' ) );144 remove_filter( 'override_load_textdomain', array( $this, 'override_load_textdomain_filter' ) ); 145 145 146 146 $is_textdomain_loaded = is_textdomain_loaded( 'wp-tests-domain' ); … … 159 159 * @return bool 160 160 */ 161 function _override_load_textdomain_filter( $override, $domain, $file ) {161 public function override_load_textdomain_filter( $override, $domain, $file ) { 162 162 global $l10n; 163 163
Note: See TracChangeset
for help on using the changeset viewer.