- Timestamp:
- 11/29/2022 03:49:49 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-block-type-controller.php
r54670 r54891 625 625 */ 626 626 public function test_prepare_item() { 627 $registry = new WP_Block_Type_Registry ;627 $registry = new WP_Block_Type_Registry(); 628 628 $settings = array( 629 629 'icon' => 'text', … … 632 632 $registry->register( 'fake/line', $settings ); 633 633 $block_type = $registry->get_registered( 'fake/line' ); 634 $endpoint = new WP_REST_Block_Types_Controller ;635 $request = new WP_REST_Request ;634 $endpoint = new WP_REST_Block_Types_Controller(); 635 $request = new WP_REST_Request(); 636 636 $request->set_param( 'context', 'edit' ); 637 637 $response = $endpoint->prepare_item_for_response( $block_type, $request ); … … 643 643 */ 644 644 public function test_prepare_item_limit_fields() { 645 $registry = new WP_Block_Type_Registry ;645 $registry = new WP_Block_Type_Registry(); 646 646 $settings = array( 647 647 'icon' => 'text', … … 650 650 $registry->register( 'fake/line', $settings ); 651 651 $block_type = $registry->get_registered( 'fake/line' ); 652 $request = new WP_REST_Request ;653 $endpoint = new WP_REST_Block_Types_Controller ;652 $request = new WP_REST_Request(); 653 $endpoint = new WP_REST_Block_Types_Controller(); 654 654 $request->set_param( 'context', 'edit' ); 655 655 $request->set_param( '_fields', 'name' );
Note: See TracChangeset
for help on using the changeset viewer.