Changeset 53268 for trunk/tests/phpunit/tests/blocks/wpBlockType.php
- Timestamp:
- 04/26/2022 09:48:20 AM (4 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/blocks/wpBlockType.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/blocks/wpBlockType.php
r52010 r53268 83 83 $this->assertSame( $args['render_callback'], $block_type->render_callback ); 84 84 $this->assertSame( $args['foo'], $block_type->foo ); 85 } 86 87 /* 88 * @ticket 55567 89 * @covers WP_Block_Type::set_props 90 */ 91 public function test_core_attributes() { 92 $block_type = new WP_Block_Type( 'core/fake', array() ); 93 94 $this->assertSameSetsWithIndex( 95 array( 96 'lock' => array( 'type' => 'object' ), 97 ), 98 $block_type->attributes 99 ); 100 } 101 102 /* 103 * @ticket 55567 104 * @covers WP_Block_Type::set_props 105 */ 106 public function test_core_attributes_matches_custom() { 107 $block_type = new WP_Block_Type( 108 'core/fake', 109 array( 110 'attributes' => array( 111 'lock' => array( 112 'type' => 'string', 113 ), 114 ), 115 ) 116 ); 117 118 // Backward compatibility: Don't override attributes with the same name. 119 $this->assertSameSetsWithIndex( 120 array( 121 'lock' => array( 'type' => 'string' ), 122 ), 123 $block_type->attributes 124 ); 85 125 } 86 126
Note: See TracChangeset
for help on using the changeset viewer.