Changeset 53916 for trunk/tests/phpunit/tests/admin/includesTheme.php
- Timestamp:
- 08/21/2022 04:55:18 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/admin/includesTheme.php
r52010 r53916 5 5 class Tests_Admin_IncludesTheme extends WP_UnitTestCase { 6 6 7 /** 8 * Theme root directory. 9 * 10 * @var string 11 */ 12 const THEME_ROOT = DIR_TESTDATA . '/themedir1'; 13 14 /** 15 * Original theme directory. 16 * 17 * @var string 18 */ 19 private $orig_theme_dir; 20 7 21 public function set_up() { 8 22 parent::set_up(); 9 $this->theme_root = DIR_TESTDATA . '/themedir1';10 23 11 24 $this->orig_theme_dir = $GLOBALS['wp_theme_directories']; 12 $GLOBALS['wp_theme_directories'] = array( WP_CONTENT_DIR . '/themes', $this->theme_root);25 $GLOBALS['wp_theme_directories'] = array( WP_CONTENT_DIR . '/themes', self::THEME_ROOT ); 13 26 14 27 add_filter( 'theme_root', array( $this, 'filter_theme_root' ) ); … … 34 47 // Replace the normal theme root directory with our premade test directory. 35 48 public function filter_theme_root( $dir ) { 36 return $this->theme_root;49 return self::THEME_ROOT; 37 50 } 38 51
Note: See TracChangeset
for help on using the changeset viewer.