From eb70891bfd9e0c2836a3034ab7f93b6e7edaea6a Mon Sep 17 00:00:00 2001 From: David Date: Fri, 14 Feb 2025 12:40:11 +0100 Subject: [PATCH] Update tests --- phpunit/block-supports/layout-test.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/phpunit/block-supports/layout-test.php b/phpunit/block-supports/layout-test.php index dd40283171e5cd..9be0d488a08e8f 100644 --- a/phpunit/block-supports/layout-test.php +++ b/phpunit/block-supports/layout-test.php @@ -413,7 +413,7 @@ public function data_gutenberg_get_layout_style() { public function test_layout_support_flag_renders_classnames_on_wrapper( $args, $expected_output ) { switch_theme( 'default' ); $actual_output = gutenberg_render_layout_support_flag( $args['block_content'], $args['block'] ); - $this->assertEquals( $expected_output, $actual_output ); + $this->assertMatchesRegularExpression( $expected_output, $actual_output ); } /** @@ -440,7 +440,7 @@ public function data_layout_support_flag_renders_classnames_on_wrapper() { ), ), ), - 'expected_output' => '
', + 'expected_output' => '/
<\\/div>/', ), 'single wrapper block layout with constrained type' => array( 'args' => array( @@ -459,7 +459,7 @@ public function data_layout_support_flag_renders_classnames_on_wrapper() { ), ), ), - 'expected_output' => '
', + 'expected_output' => '/
<\\/div>/', ), 'multiple wrapper block layout with flow type' => array( 'args' => array( @@ -480,7 +480,7 @@ public function data_layout_support_flag_renders_classnames_on_wrapper() { ), ), ), - 'expected_output' => '
', + 'expected_output' => '/
<\\/div><\\/div>/', ), 'block with child layout' => array( 'args' => array( @@ -501,7 +501,7 @@ public function data_layout_support_flag_renders_classnames_on_wrapper() { ), ), ), - 'expected_output' => '

Some text.

', // The generated classname number assumes `wp_unique_prefixed_id( 'wp-container-content-' )` will not have run previously in this test. + 'expected_output' => '/

Some text.<\\/p>/', ), ); }