- Timestamp:
- 07/07/2021 06:59:21 PM (3 years ago)
- Location:
- branches/5.8
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.8
- Property svn:mergeinfo changed
/trunk merged: 51370-51371
- Property svn:mergeinfo changed
-
branches/5.8/tests/phpunit/tests/theme/wpThemeJsonResolver.php
r51305 r51374 97 97 public function test_translations_are_applied() { 98 98 add_filter( 'locale', array( $this, 'filter_set_locale_to_polish' ) ); 99 load_textdomain( ' fse', realpath( DIR_TESTDATA . '/languages/themes/fse-pl_PL.mo' ) );99 load_textdomain( 'block-theme', realpath( DIR_TESTDATA . '/languages/themes/block-theme-pl_PL.mo' ) ); 100 100 101 switch_theme( ' fse' );101 switch_theme( 'block-theme' ); 102 102 103 103 $actual = WP_Theme_JSON_Resolver::get_theme_data(); 104 104 105 unload_textdomain( ' fse' );105 unload_textdomain( 'block-theme' ); 106 106 remove_filter( 'locale', array( $this, 'filter_set_locale_to_polish' ) ); 107 107 108 $this->assertSame( wp_get_theme()->get( 'TextDomain' ), ' fse' );108 $this->assertSame( wp_get_theme()->get( 'TextDomain' ), 'block-theme' ); 109 109 $this->assertSame( 110 110 array( … … 155 155 156 156 // Switch to a theme that does have support. 157 switch_theme( ' fse' );158 $ fse= WP_Theme_JSON_Resolver::theme_has_support();157 switch_theme( 'block-theme' ); 158 $has_theme_json_support = WP_Theme_JSON_Resolver::theme_has_support(); 159 159 160 160 $this->assertFalse( $default ); 161 $this->assertTrue( $ fse);161 $this->assertTrue( $has_theme_json_support ); 162 162 } 163 163
Note: See TracChangeset
for help on using the changeset viewer.