From c576adb226a3cfcc8f170c1be00bd9dbdd798b36 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 27 Sep 2022 16:08:43 +0000 Subject: [PATCH] Tests: Update block registration tests to account for RTL stylesheet loading changes. The RTL data should only be added in `register_block_style_handle()` if an RTL locale is selected, so these test expectations do not appear to be correct. Follow-up to [49982], [53091], [54330]. See #56325. git-svn-id: https://develop.svn.wordpress.org/trunk@54331 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/blocks/register.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/blocks/register.php b/tests/phpunit/tests/blocks/register.php index 6cec0d8158..ea6df5057e 100644 --- a/tests/phpunit/tests/blocks/register.php +++ b/tests/phpunit/tests/blocks/register.php @@ -365,7 +365,7 @@ class Tests_Blocks_Register extends WP_UnitTestCase { $result = register_block_style_handle( $metadata, 'style' ); $this->assertSame( 'unit-tests-test-block-style', $result ); - $this->assertSame( 'replace', wp_styles()->get_data( 'unit-tests-test-block-style', 'rtl' ) ); + $this->assertFalse( wp_styles()->get_data( 'unit-tests-test-block-style', 'rtl' ) ); // @ticket 50328 $this->assertSame( @@ -389,7 +389,7 @@ class Tests_Blocks_Register extends WP_UnitTestCase { $expected_style_handle = 'block-theme-example-block-editor-style'; $this->assertSame( $expected_style_handle, $result ); - $this->assertSame( 'replace', wp_styles()->get_data( $expected_style_handle, 'rtl' ) ); + $this->assertFalse( wp_styles()->get_data( $expected_style_handle, 'rtl' ) ); } /**