Changeset 57493 for trunk/tests/phpunit/tests/blocks/register.php
- Timestamp:
- 01/31/2024 09:09:22 AM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/blocks/register.php
r57068 r57493 157 157 generate_block_asset_handle( $block_name, 'style' ) 158 158 ); 159 // @ticket 59673 160 $this->assertSame( 161 'unit-tests-my-block-view-style', 162 generate_block_asset_handle( $block_name, 'viewStyle' ), 163 'asset handle for viewStyle is not generated correctly' 164 ); 159 165 } 160 166 … … 440 446 public function test_success_register_block_style_handle() { 441 447 $metadata = array( 442 'file' => DIR_TESTDATA . '/blocks/notice/block.json', 443 'name' => 'unit-tests/test-block', 444 'style' => 'file:./block.css', 448 'file' => DIR_TESTDATA . '/blocks/notice/block.json', 449 'name' => 'unit-tests/test-block', 450 'style' => 'file:./block.css', 451 'viewStyle' => 'file:./block-view.css', 445 452 ); 446 453 $result = register_block_style_handle( $metadata, 'style' ); … … 453 460 wp_normalize_path( realpath( DIR_TESTDATA . '/blocks/notice/block.css' ) ), 454 461 wp_normalize_path( wp_styles()->get_data( 'unit-tests-test-block-style', 'path' ) ) 462 ); 463 464 // Test viewStyle property 465 $result = register_block_style_handle( $metadata, 'viewStyle' ); 466 $this->assertSame( 'unit-tests-test-block-view-style', $result ); 467 468 // @ticket 59673 469 $this->assertSame( 470 wp_normalize_path( realpath( DIR_TESTDATA . '/blocks/notice/block-view.css' ) ), 471 wp_normalize_path( wp_styles()->get_data( 'unit-tests-test-block-view-style', 'path' ) ), 472 'viewStyle asset path is not correct' 455 473 ); 456 474 … … 838 856 $result->style_handles 839 857 ); 858 // @ticket 59673 859 $this->assertSameSets( 860 array( 'tests-notice-view-style' ), 861 $result->view_style_handles, 862 'parsed view_style_handles is not correct' 863 ); 840 864 841 865 // @ticket 50328 … … 843 867 wp_normalize_path( realpath( DIR_TESTDATA . '/blocks/notice/block.css' ) ), 844 868 wp_normalize_path( wp_styles()->get_data( 'unit-tests-test-block-style', 'path' ) ) 869 ); 870 871 // @ticket 59673 872 $this->assertSame( 873 wp_normalize_path( realpath( DIR_TESTDATA . '/blocks/notice/block-view.css' ) ), 874 wp_normalize_path( wp_styles()->get_data( 'unit-tests-test-block-view-style', 'path' ) ), 875 'viewStyle asset path is not correct' 845 876 ); 846 877
Note: See TracChangeset
for help on using the changeset viewer.