Changeset 55426
- Timestamp:
- 02/27/2023 03:32:22 PM (21 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-theme.php
r55332 r55426 242 242 } 243 243 } 244 245 // Handle a numeric theme directory as a string. 246 $theme_dir = (string) $theme_dir; 244 247 245 248 $this->theme_root = $theme_root; -
trunk/tests/phpunit/tests/theme/wpTheme.php
r55393 r55426 111 111 $this->assertSame( 'subdir/theme2', $theme->get_stylesheet() ); 112 112 $this->assertSame( 'subdir/theme2', $theme->get_template() ); 113 } 114 115 /** 116 * Tests that WP_Theme::__construct() handles a numeric theme directory as a string. 117 * 118 * @ticket 54645 119 * 120 * @covers WP_Theme::__construct 121 */ 122 public function test_new_WP_Theme_numeric_theme_directory() { 123 $theme = new WP_Theme( 1234, $this->theme_root ); 124 125 $this->assertSame( '1234', $theme->get_stylesheet(), 'The stylesheet property should be a string.' ); 126 $this->assertSame( '1234', $theme->get_template(), 'The template property should be a string.' ); 113 127 } 114 128
Note: See TracChangeset
for help on using the changeset viewer.