diff --git a/tests/phpunit/tests/blocks/serialize.php b/tests/phpunit/tests/blocks/serialize.php index b4221ef3c5a15..5a529e60a04e1 100644 --- a/tests/phpunit/tests/blocks/serialize.php +++ b/tests/phpunit/tests/blocks/serialize.php @@ -10,6 +10,37 @@ * @group blocks */ class Tests_Blocks_Serialize extends WP_UnitTestCase { + /** + * Set up. + * + * @ticket 63325. + */ + public static function wpSetUpBeforeClass() { + register_block_type( + 'core/attributes', + array( + 'attributes' => array( + 'array' => array( + 'type' => 'array', + ), + 'object' => array( + 'type' => 'object', + ), + ), + ) + ); + } + + /** + * Tear down. + * + * @ticket 63325. + */ + public static function wpTearDownAfterClass() { + $registry = WP_Block_Type_Registry::get_instance(); + + $registry->unregister( 'core/attributes' ); + } /** * @dataProvider data_serialize_identity_from_parsed @@ -46,6 +77,12 @@ public function data_serialize_identity_from_parsed() { // Block with attribute values that should not be escaped. array( '' ), + + // Block with empty array attribute value. + array( '' ), + + // Block with empty object attribute value. + array( '' ), ); }