Changeset 56044 for trunk/tests/phpunit/tests/blocks/register.php
- Timestamp:
- 06/26/2023 09:15:21 PM (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/blocks/register.php
r56005 r56044 398 398 public function test_handle_passed_register_block_style_handle() { 399 399 $metadata = array( 400 'name' => 'test-block', 400 401 'style' => 'test-style-handle', 401 402 ); … … 407 408 public function test_handles_passed_register_block_style_handles() { 408 409 $metadata = array( 410 'name' => 'test-block', 409 411 'style' => array( 'test-style-handle', 'test-style-handle-2' ), 410 412 ); … … 522 524 $this->assertSame( $expected_style_handle, $result ); 523 525 $this->assertFalse( wp_styles()->get_data( $expected_style_handle, 'rtl' ) ); 526 } 527 528 /** 529 * @ticket 58528 530 * 531 * @covers ::register_block_style_handle 532 */ 533 public function test_success_register_block_style_handle_exists() { 534 $expected_style_handle = 'block-theme-example-block-editor-style'; 535 wp_register_style( $expected_style_handle, false ); 536 switch_theme( 'block-theme' ); 537 538 $metadata = array( 539 'file' => wp_normalize_path( get_theme_file_path( 'blocks/example-block/block.json' ) ), 540 'name' => 'block-theme/example-block', 541 'editorStyle' => 'file:./editor-style.css', 542 ); 543 $result = register_block_style_handle( $metadata, 'editorStyle' ); 544 545 $this->assertSame( $expected_style_handle, $result ); 524 546 } 525 547
Note: See TracChangeset
for help on using the changeset viewer.