- Timestamp:
- 06/17/2021 11:28:55 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-widget-types-controller.php
r51137 r51174 200 200 201 201 /** 202 * @ticket 53407 203 */ 204 public function test_get_widgets_decodes_html_entities() { 205 wp_set_current_user( self::$admin_id ); 206 $widget_id = 'archives'; 207 wp_register_sidebar_widget( 208 $widget_id, 209 'Legacy ‑ Archive ‑ Widget', 210 function() {}, 211 array( 212 'description' => 'A great & interesting archive of your site’s posts!', 213 ) 214 ); 215 $request = new WP_REST_Request( 'GET', '/wp/v2/widget-types/archives' ); 216 $response = rest_get_server()->dispatch( $request ); 217 $data = $response->get_data(); 218 $this->assertSame( 'Legacy ‑ Archive ‑ Widget', $data['name'] ); 219 $this->assertSame( 'A great & interesting archive of your site’s posts!', $data['description'] ); 220 } 221 222 /** 202 223 * @ticket 41683 203 224 */ … … 493 514 } 494 515 495 496 516 /** 497 517 * The test_create_item() method does not exist for widget types.
Note: See TracChangeset
for help on using the changeset viewer.