- Timestamp:
- 07/02/2021 12:24:08 PM (4 years ago)
- Location:
- branches/5.8
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
tests/phpunit/tests/theme/wpThemeJsonResolver.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/5.8
-
branches/5.8/tests/phpunit/tests/theme/wpThemeJsonResolver.php
r51196 r51305 13 13 class Tests_Theme_wpThemeJsonResolver extends WP_UnitTestCase { 14 14 15 function setUp() {15 public function setUp() { 16 16 parent::setUp(); 17 17 $this->theme_root = realpath( DIR_TESTDATA . '/themedir1' ); … … 30 30 } 31 31 32 function tearDown() {32 public function tearDown() { 33 33 $GLOBALS['wp_theme_directories'] = $this->orig_theme_dir; 34 34 wp_clean_themes_cache(); … … 37 37 } 38 38 39 function filter_set_theme_root() {39 public function filter_set_theme_root() { 40 40 return $this->theme_root; 41 41 } 42 42 43 function filter_set_locale_to_polish() {43 public function filter_set_locale_to_polish() { 44 44 return 'pl_PL'; 45 45 } … … 48 48 * @ticket 52991 49 49 */ 50 function test_fields_are_extracted() {50 public function test_fields_are_extracted() { 51 51 $actual = WP_Theme_JSON_Resolver::get_fields_to_translate(); 52 52 … … 95 95 * @ticket 52991 96 96 */ 97 function test_translations_are_applied() {97 public function test_translations_are_applied() { 98 98 add_filter( 'locale', array( $this, 'filter_set_locale_to_polish' ) ); 99 99 load_textdomain( 'fse', realpath( DIR_TESTDATA . '/languages/themes/fse-pl_PL.mo' ) ); … … 149 149 * @ticket 52991 150 150 */ 151 function test_switching_themes_recalculates_data() {151 public function test_switching_themes_recalculates_data() { 152 152 // By default, the theme for unit tests is "default", 153 153 // which doesn't have theme.json support.
Note: See TracChangeset
for help on using the changeset viewer.