Changeset 36538 for trunk/tests/phpunit/tests/l10n.php
- Timestamp:
- 02/16/2016 09:14:45 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/l10n.php
r35959 r36538 27 27 } 28 28 29 /** 30 * @ticket 21319 31 */ 32 function test_is_textdomain_loaded_for_no_translations() { 33 $this->assertFalse( load_textdomain( 'wp-tests-domain', DIR_TESTDATA . '/non-existent-file' ) ); 34 $this->assertFalse( is_textdomain_loaded( 'wp-tests-domain' ) ); 35 $this->assertInstanceOf( 'NOOP_Translations', get_translations_for_domain( 'wp-tests-domain' ) ); 36 // Ensure that we don't confuse NOOP_Translations to be a loaded text domain. 37 $this->assertFalse( is_textdomain_loaded( 'wp-tests-domain' ) ); 38 $this->assertFalse( unload_textdomain( 'wp-tests-domain' ) ); 39 } 40 41 /** 42 * @ticket 21319 43 */ 44 function test_is_textdomain_is_not_loaded_after_gettext_call_with_no_translations() { 45 $this->assertFalse( is_textdomain_loaded( 'wp-tests-domain' ) ); 46 __( 'just some string', 'wp-tests-domain' ); 47 $this->assertFalse( is_textdomain_loaded( 'wp-tests-domain' ) ); 48 } 29 49 }
Note: See TracChangeset
for help on using the changeset viewer.