diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
index 25e9c9a..16765a5 100644
a
|
b
|
class WP_REST_Posts_Controller extends WP_REST_Controller { |
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.' ), |
diff --git a/tests/phpunit/includes/testcase-rest-post-type-controller.php b/tests/phpunit/includes/testcase-rest-post-type-controller.php
index 49c2eba..387d359 100644
a
|
b
|
abstract class WP_Test_REST_Post_Type_Controller_Testcase extends WP_Test_REST_C |
134 | 134 | $this->assertFalse( isset( $data['excerpt'] ) ); |
135 | 135 | } |
136 | 136 | |
| 137 | $this->assertEquals( $post->post_status, $data['status'] ); |
137 | 138 | $this->assertEquals( $post->guid, $data['guid']['rendered'] ); |
138 | 139 | |
139 | 140 | if ( 'edit' === $context ) { |
140 | 141 | $this->assertEquals( $post->guid, $data['guid']['raw'] ); |
141 | | $this->assertEquals( $post->post_status, $data['status'] ); |
142 | 142 | |
143 | 143 | if ( '0000-00-00 00:00:00' === $post->post_date_gmt ) { |
144 | 144 | $this->assertNull( $data['date_gmt'] ); |