Themes: Add block template resolution algorithm unit tests.

Backports the unit tests for block templates
and hybrid themes template resolution from the Gutenberg plugin.

Props bernhard-reiter, jorgefilipecosta.
Fixes #54478. 


git-svn-id: https://develop.svn.wordpress.org/trunk@52246 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Riad Benguella
2021-11-25 09:20:03 +00:00
parent 388b59319e
commit 90cdaabd2f
8 changed files with 150 additions and 21 deletions
@@ -0,0 +1,3 @@
<!-- wp:paragraph -->
<p>Page (ID 1) Template</p>
<!-- /wp:paragraph -->
@@ -0,0 +1,3 @@
<?php
echo 'PHP template for page with slug "home"';
@@ -0,0 +1,3 @@
<!-- wp:paragraph -->
<p>Index Template</p>
<!-- /wp:paragraph -->
@@ -0,0 +1,3 @@
<!-- wp:paragraph -->
<p>Page (Home) Template</p>
<!-- /wp:paragraph -->
@@ -0,0 +1,3 @@
<!-- wp:paragraph -->
<p>Page Template</p>
<!-- /wp:paragraph -->
@@ -0,0 +1,3 @@
<?php
echo 'PHP template for page with ID 1';