You appear to be a bot. Output may be restricted
Description
Usage
REST_Block_Type_Controller_Test::test_prepare_item();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/rest-api/rest-block-type-controller.php
Lines:
1 to 15 of 15
public function test_prepare_item() { $registry = new WP_Block_Type_Registry; $settings = array( 'icon' => 'text', 'render_callback' => '__return_null', ); $registry->register( 'fake/line', $settings ); $block_type = $registry->get_registered( 'fake/line' ); $endpoint = new WP_REST_Block_Types_Controller; $request = new WP_REST_Request; $request->set_param( 'context', 'edit' ); $response = $endpoint->prepare_item_for_response( $block_type, $request ); $this->check_block_type_object( $block_type, $response->get_data(), $response->get_links() ); }