Changeset 55436 for trunk/tests/phpunit/tests/block-template.php
- Timestamp:
- 02/28/2023 03:05:50 PM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/block-template.php
r54889 r55436 189 189 $this->assertSame( '', $resolved_template_path ); 190 190 } 191 192 /**193 * Covers: https://github.com/WordPress/gutenberg/pull/38817.194 *195 * @ticket 55505196 */197 public function test_resolve_home_block_template_default_hierarchy() {198 $template = _resolve_home_block_template();199 200 $this->assertSame( 'wp_template', $template['postType'] );201 $this->assertSame( get_stylesheet() . '//index', $template['postId'] );202 }203 204 /**205 * @ticket 55505206 */207 public function test_resolve_home_block_template_static_homepage() {208 $post_id = self::factory()->post->create( array( 'post_type' => 'page' ) );209 update_option( 'show_on_front', 'page' );210 update_option( 'page_on_front', $post_id );211 212 $template = _resolve_home_block_template();213 214 $this->assertSame( 'page', $template['postType'] );215 $this->assertSame( $post_id, $template['postId'] );216 217 delete_option( 'show_on_front', 'page' );218 }219 220 /**221 * @ticket 55505222 */223 public function test_resolve_home_block_template_no_resolution() {224 switch_theme( 'stylesheetonly' );225 $template = _resolve_home_block_template();226 227 $this->assertNull( $template );228 }229 191 }
Note: See TracChangeset
for help on using the changeset viewer.