mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-03 22:27:04 +00:00
Add fields to WP_Block_Type
As part of #47620 and the RFC for block registeration. Server registered blocks are missing some fields. These changeset includes them. Props spacedmonkey, aduth. Fixes #48529. git-svn-id: https://develop.svn.wordpress.org/trunk@47875 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -825,6 +825,7 @@ class Tests_Admin_Includes_Post extends WP_UnitTestCase {
|
||||
function test_get_block_editor_server_block_settings() {
|
||||
$name = 'core/test';
|
||||
$settings = array(
|
||||
'category' => 'common',
|
||||
'icon' => 'text',
|
||||
'render_callback' => 'foo',
|
||||
);
|
||||
@@ -836,7 +837,15 @@ class Tests_Admin_Includes_Post extends WP_UnitTestCase {
|
||||
unregister_block_type( $name );
|
||||
|
||||
$this->assertArrayHasKey( $name, $blocks );
|
||||
$this->assertSame( array( 'icon' => 'text' ), $blocks[ $name ] );
|
||||
$this->assertEquals( array(
|
||||
'title' => '',
|
||||
'description' => '',
|
||||
'category' => 'common',
|
||||
'icon' => 'text',
|
||||
'keywords' => array(),
|
||||
'supports' => array(),
|
||||
'styles' => array(),
|
||||
), $blocks[ $name ] );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user