Make WordPress Core


Ignore:
Timestamp:
10/21/2025 07:11:53 AM (7 months ago)
Author:
ellatrix
Message:

Editor: update packages.

Updates the packages to match Gutenberg version 21.9.0 RC2.

Also updates the sync script to work with the new package-lock.json format.
Some reusable block tests were adjusted to work with more render arguments.
Added core-data to the ignore list for verify:source-maps because Yjs has been bundled by accident. To be removed in a follow-up. See https://core.trac.wordpress.org/ticket/64120. See https://github.com/WordPress/gutenberg/pull/72503.

See: https://github.com/WordPress/wordpress-develop/pull/10355.
See: https://core.trac.wordpress.org/ticket/64117.

Props ellatrix, dmsnell.
Fixes #64117.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/blocks/renderReusable.php

    r57032 r61009  
    7878
    7979    public function test_render() {
    80         $block_type = WP_Block_Type_Registry::get_instance()->get_registered( 'core/block' );
    81         $output     = $block_type->render( array( 'ref' => self::$block_id ) );
     80        $parsed_block = array(
     81            'blockName' => 'core/block',
     82            'attrs'     => array( 'ref' => self::$block_id ),
     83        );
     84        $block        = new WP_Block( $parsed_block );
     85        $output       = $block->render();
    8286        $this->assertSame( '<p>Hello world!</p>', $output );
    8387    }
     
    8993     */
    9094    public function test_render_subsequent() {
    91         $block_type = WP_Block_Type_Registry::get_instance()->get_registered( 'core/block' );
    92         $output     = $block_type->render( array( 'ref' => self::$block_id ) );
    93         $output    .= $block_type->render( array( 'ref' => self::$block_id ) );
     95        $parsed_block = array(
     96            'blockName' => 'core/block',
     97            'attrs'     => array( 'ref' => self::$block_id ),
     98        );
     99        $block        = new WP_Block( $parsed_block );
     100        $output       = $block->render();
     101        $output      .= $block->render();
    94102        $this->assertSame( '<p>Hello world!</p><p>Hello world!</p>', $output );
    95103    }
    96104
    97105    public function test_ref_empty() {
    98         $block_type = WP_Block_Type_Registry::get_instance()->get_registered( 'core/block' );
    99         $output     = $block_type->render( array() );
     106        $parsed_block = array(
     107            'blockName' => 'core/block',
     108            'attrs'     => array(),
     109        );
     110        $block        = new WP_Block( $parsed_block );
     111        $output       = $block->render();
    100112        $this->assertSame( '', $output );
    101113    }
    102114
    103115    public function test_ref_wrong_post_type() {
    104         $block_type = WP_Block_Type_Registry::get_instance()->get_registered( 'core/block' );
    105         $output     = $block_type->render( array( 'ref' => self::$post_id ) );
     116        $parsed_block = array(
     117            'blockName' => 'core/block',
     118            'attrs'     => array( 'ref' => self::$post_id ),
     119        );
     120        $block        = new WP_Block( $parsed_block );
     121        $output       = $block->render();
    106122        $this->assertSame( '', $output );
    107123    }
Note: See TracChangeset for help on using the changeset viewer.