- Timestamp:
- 11/20/2024 01:32:57 PM (3 months ago)
- Location:
- branches/6.7
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.7
-
branches/6.7/tests/phpunit/tests/l10n/loadTextdomainJustInTime.php
r57516 r59433 343 343 $this->assertSame( 1, $filter->get_call_count() ); 344 344 } 345 346 /** 347 * @ticket 44937 348 * @ticket 62337 349 * 350 * @covers ::load_plugin_textdomain 351 * @covers ::is_textdomain_loaded 352 * @covers WP_Textdomain_Registry::set_custom_path 353 */ 354 public function test_plugin_translation_should_be_translated_when_calling_load_plugin_textdomain_too_late() { 355 require_once DIR_TESTDATA . '/plugins/custom-internationalized-plugin/custom-internationalized-plugin.php'; 356 357 add_filter( 'locale', array( $this, 'filter_set_locale_to_german' ) ); 358 359 $is_textdomain_loaded_before = is_textdomain_loaded( 'custom-internationalized-plugin' ); 360 $output_before = custom_i18n_plugin_test(); 361 362 $is_textdomain_loaded_middle = is_textdomain_loaded( 'custom-internationalized-plugin' ); 363 364 custom_i18n_load_textdomain(); 365 366 $output_after = custom_i18n_plugin_test(); 367 $is_textdomain_loaded_after = is_textdomain_loaded( 'custom-internationalized-plugin' ); 368 369 $this->assertFalse( $is_textdomain_loaded_before ); 370 $this->assertFalse( $is_textdomain_loaded_middle ); 371 $this->assertSame( 'This is a dummy plugin', $output_before ); 372 $this->assertSame( 'Das ist ein Dummy Plugin', $output_after ); 373 $this->assertTrue( $is_textdomain_loaded_after ); 374 } 345 375 }
Note: See TracChangeset
for help on using the changeset viewer.