-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic coverage for gutenberg_get_template_slugs
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
phpunit/compat/wordpress-6.1/block-template-utils-test.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
/** | ||
* Tests_Block_Template_Utils class | ||
* | ||
* @package gutenberg | ||
*/ | ||
|
||
/** | ||
* Tests for the Block Templates abstraction layer. | ||
* | ||
* @group block-templates | ||
*/ | ||
class Tests_Block_Template_Utils_6_1 extends WP_UnitTestCase { | ||
public function test_get_template_slugs() { | ||
$templates = gutenberg_get_template_slugs( 'single-post-hello-world' ); | ||
$this->assertSame( | ||
array( | ||
'single-post-hello-world', | ||
// Should *not* fall back to `single-post-hello`! | ||
'single-post', | ||
'single', | ||
), | ||
$templates | ||
); | ||
} | ||
} |