- Timestamp:
- 05/16/2016 03:09:33 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/l10n/loadTextdomainJustInTime.php
r37415 r37440 59 59 $is_textdomain_loaded_after = is_textdomain_loaded( 'internationalized-plugin' ); 60 60 61 unload_textdomain( 'internationalized-plugin' ); 61 62 remove_filter( 'locale', array( $this, 'filter_set_locale_to_german' ) ); 62 63 … … 80 81 $is_textdomain_loaded_after = is_textdomain_loaded( 'internationalized-theme' ); 81 82 83 unload_textdomain( 'internationalized-theme' ); 82 84 remove_filter( 'locale', array( $this, 'filter_set_locale_to_german' ) ); 83 85 … … 86 88 $this->assertTrue( $is_textdomain_loaded_after ); 87 89 } 90 91 /** 92 * @ticket 341142 93 */ 94 public function test_get_translations_for_domain_does_not_return_null_if_override_load_textdomain_is_used() { 95 add_filter( 'locale', array( $this, 'filter_set_locale_to_german' ) ); 96 add_filter( 'override_load_textdomain', '__return_true' ); 97 $translations = get_translations_for_domain( 'internationalized-plugin' ); 98 remove_filter( 'override_load_textdomain', '__return_true' ); 99 remove_filter( 'locale', array( $this, 'filter_set_locale_to_german' ) ); 100 101 $this->assertTrue( $translations instanceof NOOP_Translations ); 102 } 88 103 }
Note: See TracChangeset
for help on using the changeset viewer.