Changeset 52137
- Timestamp:
- 11/11/2021 04:52:22 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-block-directory-controller.php
r51563 r52137 70 70 public function test_get_items() { 71 71 wp_set_current_user( self::$admin_id ); 72 add_filter( 73 'pre_http_request', 74 static function() { 75 /* 76 * Mocks the request to: 77 * https://api.wordpress.org/plugins/info/1.2/?action=query_plugins&request%5Bblock%5D=foo&request%5Bper_page%5D=10&request%5Bpage%5D=1&request%5Blocale%5D=en_US&request%5Bwp_version%5D=5.9 78 */ 79 return array( 80 'headers' => array(), 81 'response' => array( 82 'code' => 200, 83 'message' => 'OK', 84 ), 85 'body' => '{"info":{"page":1,"pages":0,"results":0},"plugins":[]}', 86 'cookies' => array(), 87 'filename' => null, 88 ); 89 } 90 ); 72 91 73 92 $request = new WP_REST_Request( 'GET', '/wp/v2/block-directory/search' );
Note: See TracChangeset
for help on using the changeset viewer.