You appear to be a bot. Output may be restricted
Description
Usage
REST_Block_Type_Controller_Test::test_get_item_with_styles();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/rest-api/rest-block-type-controller.php
Lines:
1 to 17 of 17
public function test_get_item_with_styles() { $block_name = 'fake/styles'; $block_styles = array( 'name' => 'fancy-quote', 'label' => 'Fancy Quote', 'style_handle' => 'myguten-style', ); register_block_type( $block_name ); register_block_style( $block_name, $block_styles ); wp_set_current_user( self::$admin_id ); $request = new WP_REST_Request( 'GET', '/wp/v2/block-types/' . $block_name ); $response = rest_get_server()->dispatch( $request ); $data = $response->get_data(); $this->assertSameSets( array( $block_styles ), $data['styles'] ); }