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
This commit is contained in:
Sergey Biryukov 2022-09-27 16:08:43 +00:00
parent d145c50e14
commit c576adb226

View File

@ -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' ) );
}
/**