- Timestamp:
- 09/14/2022 10:50:26 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-block-type-controller.php
r54058 r54155 238 238 $this->assertSame( '1', $data['description'] ); 239 239 $this->assertNull( $data['icon'] ); 240 $this->assert Null( $data['editor_script'] );241 $this->assert Null( $data['script'] );242 $this->assert Null( $data['view_script'] );243 $this->assert Null( $data['editor_style'] );244 $this->assert Null( $data['style'] );240 $this->assertSameSets( array(), $data['editor_script_handles'] ); 241 $this->assertSameSets( array(), $data['script_handles'] ); 242 $this->assertSameSets( array(), $data['view_script_handles'] ); 243 $this->assertSameSets( array(), $data['editor_style_handles'] ); 244 $this->assertSameSets( array(), $data['style_handles'] ); 245 245 $this->assertSameSets( array(), $data['provides_context'] ); 246 246 $this->assertSameSetsWithIndex( … … 261 261 $this->assertFalse( $data['is_dynamic'] ); 262 262 $this->assertSameSets( array( array() ), $data['variations'] ); 263 // Deprecated properties. 264 $this->assertNull( $data['editor_script'] ); 265 $this->assertNull( $data['script'] ); 266 $this->assertNull( $data['view_script'] ); 267 $this->assertNull( $data['editor_style'] ); 268 $this->assertNull( $data['style'] ); 269 263 270 } 264 271 … … 300 307 $this->assertSame( '', $data['description'] ); 301 308 $this->assertNull( $data['icon'] ); 302 $this->assert Null( $data['editor_script'] );303 $this->assert Null( $data['script'] );304 $this->assert Null( $data['view_script'] );305 $this->assert Null( $data['editor_style'] );306 $this->assert Null( $data['style'] );309 $this->assertSameSets( array(), $data['editor_script_handles'] ); 310 $this->assertSameSets( array(), $data['script_handles'] ); 311 $this->assertSameSets( array(), $data['view_script_handles'] ); 312 $this->assertSameSets( array(), $data['editor_style_handles'] ); 313 $this->assertSameSets( array(), $data['style_handles'] ); 307 314 $this->assertSameSetsWithIndex( 308 315 array( … … 324 331 $this->assertFalse( $data['is_dynamic'] ); 325 332 $this->assertSameSets( array(), $data['variations'] ); 333 // Deprecated properties. 334 $this->assertNull( $data['editor_script'] ); 335 $this->assertNull( $data['script'] ); 336 $this->assertNull( $data['view_script'] ); 337 $this->assertNull( $data['editor_style'] ); 338 $this->assertNull( $data['style'] ); 326 339 } 327 340 … … 393 406 $data = $response->get_data(); 394 407 $properties = $data['schema']['properties']; 395 $this->assertCount( 2 3, $properties );408 $this->assertCount( 28, $properties ); 396 409 $this->assertArrayHasKey( 'api_version', $properties ); 397 410 $this->assertArrayHasKey( 'title', $properties ); … … 406 419 $this->assertArrayHasKey( 'category', $properties ); 407 420 $this->assertArrayHasKey( 'is_dynamic', $properties ); 408 $this->assertArrayHasKey( 'editor_script ', $properties );409 $this->assertArrayHasKey( 'script ', $properties );410 $this->assertArrayHasKey( 'view_script ', $properties );411 $this->assertArrayHasKey( 'editor_style ', $properties );412 $this->assertArrayHasKey( 'style ', $properties );421 $this->assertArrayHasKey( 'editor_script_handles', $properties ); 422 $this->assertArrayHasKey( 'script_handles', $properties ); 423 $this->assertArrayHasKey( 'view_script_handles', $properties ); 424 $this->assertArrayHasKey( 'editor_style_handles', $properties ); 425 $this->assertArrayHasKey( 'style_handles', $properties ); 413 426 $this->assertArrayHasKey( 'parent', $properties ); 414 427 $this->assertArrayHasKey( 'example', $properties ); … … 417 430 $this->assertArrayHasKey( 'variations', $properties ); 418 431 $this->assertArrayHasKey( 'ancestor', $properties ); 432 // Deprecated properties. 433 $this->assertArrayHasKey( 'editor_script', $properties ); 434 $this->assertArrayHasKey( 'script', $properties ); 435 $this->assertArrayHasKey( 'view_script', $properties ); 436 $this->assertArrayHasKey( 'editor_style', $properties ); 437 $this->assertArrayHasKey( 'style', $properties ); 438 419 439 } 420 440 … … 519 539 'name', 520 540 'category', 521 'editor_script ',522 'script ',523 'view_script ',524 'editor_style ',525 'style ',541 'editor_script_handles', 542 'script_handles', 543 'view_script_handles', 544 'editor_style_handles', 545 'style_handles', 526 546 'title', 527 547 'icon', … … 535 555 'textdomain', 536 556 'example', 557 // Deprecated fields. 558 'editor_script', 559 'script', 560 'view_script', 561 'editor_style', 562 'style', 537 563 ); 538 564
Note: See TracChangeset
for help on using the changeset viewer.