Ticket #39466: 39466-1.patch
File 39466-1.patch, 1.4 KB (added by , 8 years ago) |
---|
-
src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
1767 1767 'description' => __( 'A named status for the object.' ), 1768 1768 'type' => 'string', 1769 1769 'enum' => array_keys( get_post_stati( array( 'internal' => false ) ) ), 1770 'context' => array( ' edit' ),1770 'context' => array( 'view', 'edit' ), 1771 1771 ), 1772 1772 'type' => array( 1773 1773 'description' => __( 'Type of Post for the object.' ), -
tests/phpunit/tests/rest-api/rest-posts-controller.php
2657 2657 $this->assertArrayHasKey( 'type', $properties ); 2658 2658 $this->assertArrayHasKey( 'tags', $properties ); 2659 2659 $this->assertArrayHasKey( 'categories', $properties ); 2660 2661 // Test for ticket: https://core.trac.wordpress.org/ticket/39466 2662 $this->assertArrayHasKey( 'context', $properties['status'] ); 2663 $this->assertContains( 'view', $properties['status']['context'] ); 2660 2664 } 2661 2665 2662 2666 public function test_status_array_enum_args() {