@@ -56,55 +56,55 @@ private function register_visibility_block_with_support( $block_name, $supports
5656
5757 /**
5858 * Tests that block visibility support renders empty string when block is hidden
59- * and blockVisibility support is opted in.
59+ * and visibility support is opted in.
6060 *
6161 * @ticket 64061
6262 */
6363 public function test_block_visibility_support_hides_block_when_visibility_false () {
6464 $ block_type = $ this ->register_visibility_block_with_support (
6565 'test/visibility-block ' ,
66- array ( 'blockVisibility ' => true )
66+ array ( 'visibility ' => true )
6767 );
6868
6969 $ block_content = '<p>This is a test block.</p> ' ;
7070 $ block = array (
7171 'blockName ' => 'test/visibility-block ' ,
7272 'attrs ' => array (
7373 'metadata ' => array (
74- 'blockVisibility ' => false ,
74+ 'visibility ' => false ,
7575 ),
7676 ),
7777 );
7878
7979 $ result = wp_render_block_visibility_support ( $ block_content , $ block );
8080
81- $ this ->assertSame ( '' , $ result , 'Block content should be empty when blockVisibility is false and support is opted in. ' );
81+ $ this ->assertSame ( '' , $ result , 'Block content should be empty when visibility is false and support is opted in. ' );
8282 }
8383
8484 /**
8585 * Tests that block visibility support renders block normally when visibility is false
86- * but blockVisibility support is not opted in.
86+ * but visibility support is not opted in.
8787 *
8888 * @ticket 64061
8989 */
9090 public function test_block_visibility_support_shows_block_when_support_not_opted_in () {
9191 $ block_type = $ this ->register_visibility_block_with_support (
9292 'test/visibility-block ' ,
93- array ( 'blockVisibility ' => false )
93+ array ( 'visibility ' => false )
9494 );
9595
9696 $ block_content = '<p>This is a test block.</p> ' ;
9797 $ block = array (
9898 'blockName ' => 'test/visibility-block ' ,
9999 'attrs ' => array (
100100 'metadata ' => array (
101- 'blockVisibility ' => false ,
101+ 'visibility ' => false ,
102102 ),
103103 ),
104104 );
105105
106106 $ result = wp_render_block_visibility_support ( $ block_content , $ block );
107107
108- $ this ->assertSame ( $ block_content , $ result , 'Block content should remain unchanged when blockVisibility support is not opted in. ' );
108+ $ this ->assertSame ( $ block_content , $ result , 'Block content should remain unchanged when visibility support is not opted in. ' );
109109 }
110110}
0 commit comments