Changeset 54036 for trunk/tests/phpunit/tests/theme/wpThemeJsonResolver.php
- Timestamp:
- 08/31/2022 10:11:30 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/theme/wpThemeJsonResolver.php
r53916 r54036 83 83 84 84 switch_theme( 'block-theme' ); 85 $actual = WP_Theme_JSON_Resolver::get_theme_data(); 85 $theme_data = WP_Theme_JSON_Resolver::get_theme_data(); 86 $style_variations = WP_Theme_JSON_Resolver::get_style_variations(); 86 87 87 88 unload_textdomain( 'block-theme' ); 88 89 remove_filter( 'locale', array( $this, 'filter_set_locale_to_polish' ) ); 89 90 90 $this->assertSame( wp_get_theme()->get( 'TextDomain' ), 'block-theme' ); 91 $this->assertSame( 91 $this->assertSame( 'block-theme', wp_get_theme()->get( 'TextDomain' ) ); 92 $this->assertSame( 'Motyw blokowy', $theme_data->get_data()['title'] ); 93 $this->assertSameSets( 92 94 array( 93 95 'color' => array( … … 151 153 ), 152 154 ), 153 $actual->get_settings() 154 ); 155 $this->assertSame( 156 $actual->get_custom_templates(), 155 $theme_data->get_settings() 156 ); 157 $this->assertSameSets( 157 158 array( 158 159 'page-home' => array( … … 160 161 'postTypes' => array( 'page' ), 161 162 ), 162 ) 163 );164 $this->assertSame(165 $actual->get_template_parts(),163 ), 164 $theme_data->get_custom_templates() 165 ); 166 $this->assertSameSets( 166 167 array( 167 168 'small-header' => array( … … 169 170 'area' => 'header', 170 171 ), 171 ) 172 ), 173 $theme_data->get_template_parts() 174 ); 175 $this->assertSame( 176 'Wariant motywu blokowego', 177 $style_variations[0]['title'] 172 178 ); 173 179 }
Note: See TracChangeset
for help on using the changeset viewer.