mirror of
git://develop.git.wordpress.org/
synced 2025-02-07 08:04:27 +01:00
Build/Test Tools: Add unit test for non-existing block-styles registration.
Follow-up to [54155]. Props aristath, mukesh27. Fixes #56664. git-svn-id: https://develop.svn.wordpress.org/trunk@54472 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e5ad18117c
commit
5b5e1bb8c9
@ -374,6 +374,21 @@ class Tests_Blocks_Register extends WP_UnitTestCase {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 56664
|
||||
*/
|
||||
public function test_register_nonexistent_stylesheet() {
|
||||
$metadata = array(
|
||||
'file' => DIR_TESTDATA . '/blocks/notice/block.json',
|
||||
'name' => 'unit-tests/test-block-nonexistent-stylesheet',
|
||||
'style' => 'file:./nonexistent.css',
|
||||
);
|
||||
register_block_style_handle( $metadata, 'style' );
|
||||
|
||||
global $wp_styles;
|
||||
$this->assertFalse( $wp_styles->registered['unit-tests-test-block-nonexistent-stylesheet-style']->src );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 55513
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user