Changeset 47876
- Timestamp:
- 06/01/2020 04:25:18 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-block-type.php
r47875 r47876 138 138 * Will populate object properties from the provided arguments. 139 139 * 140 * @since 5.0.0 141 * 142 * @see register_block_type() 143 * 140 144 * @param string $block_type Block type name including namespace. 141 145 * @param array|string $args Optional. Array or string of arguments for registering a block type. 142 146 * Default empty array. 143 *144 * @since 5.0.0145 *146 * @see register_block_type()147 *148 147 */ 149 148 public function __construct( $block_type, $args = array() ) { -
trunk/tests/phpunit/tests/admin/includesPost.php
r47875 r47876 838 838 839 839 $this->assertArrayHasKey( $name, $blocks ); 840 $this->assertEquals( array( 841 'title' => '', 842 'description' => '', 843 'category' => 'common', 844 'icon' => 'text', 845 'keywords' => array(), 846 'supports' => array(), 847 'styles' => array(), 848 ), $blocks[ $name ] ); 840 $this->assertEquals( 841 array( 842 'title' => '', 843 'description' => '', 844 'category' => 'common', 845 'icon' => 'text', 846 'keywords' => array(), 847 'supports' => array(), 848 'styles' => array(), 849 ), 850 $blocks[ $name ] 851 ); 849 852 } 850 853 -
trunk/tests/phpunit/tests/blocks/block-type.php
r47875 r47876 354 354 */ 355 355 public function test_register_block() { 356 $block_type = new WP_Block_Type( 'core/fake', array( 357 'title' => 'Test title', 358 'category' => 'Test category', 359 'parent' => array( 'core/third-party' ), 360 'icon' => 'icon.png', 361 'description' => 'test description', 362 'keywords' => array( 'test keyword' ), 363 'textdomain' => 'test_domain', 364 'supports' => array( 'alignment' => true ), 365 ) ); 356 $block_type = new WP_Block_Type( 357 'core/fake', 358 array( 359 'title' => 'Test title', 360 'category' => 'Test category', 361 'parent' => array( 'core/third-party' ), 362 'icon' => 'icon.png', 363 'description' => 'test description', 364 'keywords' => array( 'test keyword' ), 365 'textdomain' => 'test_domain', 366 'supports' => array( 'alignment' => true ), 367 ) 368 ); 366 369 367 370 $this->assertSame( 'Test title', $block_type->title );
Note: See TracChangeset
for help on using the changeset viewer.