- Timestamp:
- 05/29/2024 08:51:04 AM (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-settings-controller.php
r55457 r58230 782 782 $this->assertSame( 3, $response->data['mycustomsetting']['test3'] ); 783 783 } 784 785 /** 786 * @ticket 61023 787 */ 788 public function test_provides_setting_metadata_in_schema() { 789 $request = new WP_REST_Request( 'OPTIONS', '/wp/v2/settings' ); 790 $response = rest_get_server()->dispatch( $request ); 791 $data = $response->get_data(); 792 $title = $data['schema']['properties']['title']; 793 794 $this->assertSame( 'string', $title['type'] ); 795 $this->assertSame( 'Title', $title['title'] ); 796 $this->assertSame( 'Site title.', $title['description'] ); 797 $this->assertSame( null, $title['default'] ); 798 } 784 799 }
Note: See TracChangeset
for help on using the changeset viewer.