- Timestamp:
- 04/21/2023 10:41:58 AM (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-block-type-controller.php
r55457 r55673 197 197 /** 198 198 * @ticket 47620 199 * @ticket 57585 199 200 */ 200 201 public function test_get_item_invalid() { … … 217 218 'parent' => 'invalid_parent', 218 219 'ancestor' => 'invalid_ancestor', 220 'selectors' => 'invalid_selectors', 219 221 'supports' => 'invalid_supports', 220 222 'styles' => array(), … … 248 250 $this->assertSameSets( array( 'invalid_parent' ), $data['parent'] ); 249 251 $this->assertSameSets( array( 'invalid_ancestor' ), $data['ancestor'] ); 252 $this->assertSameSets( array(), $data['selectors'], 'invalid selectors defaults to empty array' ); 250 253 $this->assertSameSets( array(), $data['supports'] ); 251 254 $this->assertSameSets( array(), $data['styles'] ); … … 266 269 /** 267 270 * @ticket 47620 271 * @ticket 57585 268 272 */ 269 273 public function test_get_item_defaults() { … … 285 289 'parent' => false, 286 290 'ancestor' => false, 291 'selectors' => false, 287 292 'supports' => false, 288 293 'styles' => false, … … 317 322 $this->assertSameSets( array(), $data['parent'] ); 318 323 $this->assertSameSets( array(), $data['ancestor'] ); 324 $this->assertSameSets( array(), $data['selectors'], 'selectors defaults to empty array' ); 319 325 $this->assertSameSets( array(), $data['supports'] ); 320 326 $this->assertSameSets( array(), $data['styles'] ); … … 535 541 /** 536 542 * @ticket 47620 543 * @ticket 57585 537 544 */ 538 545 public function test_get_item_schema() { … … 542 549 $data = $response->get_data(); 543 550 $properties = $data['schema']['properties']; 544 $this->assertCount( 2 8, $properties );551 $this->assertCount( 29, $properties ); 545 552 $this->assertArrayHasKey( 'api_version', $properties ); 546 553 $this->assertArrayHasKey( 'title', $properties ); … … 552 559 $this->assertArrayHasKey( 'name', $properties ); 553 560 $this->assertArrayHasKey( 'attributes', $properties ); 561 $this->assertArrayHasKey( 'selectors', $properties, 'schema must contain selectors' ); 554 562 $this->assertArrayHasKey( 'supports', $properties ); 555 563 $this->assertArrayHasKey( 'category', $properties );
Note: See TracChangeset
for help on using the changeset viewer.