Changeset 55493 for trunk/tests/phpunit/tests/block-template-utils.php
- Timestamp:
- 03/08/2023 10:43:32 PM (23 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/block-template-utils.php
r55457 r55493 120 120 } 121 121 122 /**123 * Tests that _build_block_template_result_from_post() returns the correct theme124 * for the template when a child theme is active.125 *126 * @ticket 55437127 *128 * @covers ::_build_block_template_result_from_post129 */130 public function test_build_block_template_result_from_post_with_child_theme() {131 switch_theme( 'block-theme-child' );132 133 $template = _build_block_template_result_from_post(134 self::$template_post,135 'wp_template'136 );137 138 $this->assertSame( self::TEST_THEME, $template->theme );139 }140 141 122 public function test_build_block_template_result_from_file() { 142 123 $template = _build_block_template_result_from_file( … … 175 156 $this->assertSame( 'wp_template_part', $template_part->type ); 176 157 $this->assertSame( WP_TEMPLATE_PART_AREA_HEADER, $template_part->area ); 177 }178 179 /**180 * Tests that _build_block_template_result_from_file() returns the correct theme181 * for the template when a child theme is active.182 *183 * @ticket 55437184 *185 * @covers ::_build_block_template_result_from_file186 */187 public function test_build_block_template_result_from_file_with_child_theme() {188 switch_theme( 'block-theme-child' );189 190 $template = _build_block_template_result_from_file(191 array(192 'slug' => 'single',193 'path' => __DIR__ . '/../data/templates/template.html',194 'theme' => self::TEST_THEME,195 ),196 'wp_template'197 );198 199 $this->assertSame( self::TEST_THEME, $template->theme );200 158 } 201 159
Note: See TracChangeset
for help on using the changeset viewer.