Changeset 63952
- Timestamp:
- 09/27/2026 05:40:51 PM (44 hours ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/wpRestBlockPatternCategoriesController.php
r62957 r63952 227 227 228 228 /** 229 * @doesNotPerformAssertions 229 * @ticket 40538 230 * 231 * @covers WP_REST_Block_Pattern_Categories_Controller::get_item_schema 230 232 */ 231 233 public function test_get_item_schema() { 232 // Controller does not implement get_item_schema(). 234 $request = new WP_REST_Request( 'OPTIONS', static::REQUEST_ROUTE ); 235 $response = rest_get_server()->dispatch( $request ); 236 $data = $response->get_data(); 237 238 $properties = $data['schema']['properties']; 239 $this->assertCount( 3, $properties, 'The schema should contain 3 properties.' ); 240 $this->assertArrayHasKey( 'name', $properties, 'The schema should contain a name property.' ); 241 $this->assertArrayHasKey( 'label', $properties, 'The schema should contain a label property.' ); 242 $this->assertArrayHasKey( 'description', $properties, 'The schema should contain a description property.' ); 233 243 } 234 244 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)