mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-02 21:56:56 +00:00
REST API: Add batch support for posts and terms controllers.
This also exposes the value of `allow_batch` in `OPTIONS` requests to a route. A future commit will add batch support to more resources. Props spacedmonkey, chrisvanpatten. See #53063. git-svn-id: https://develop.svn.wordpress.org/trunk@52068 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1523,6 +1523,8 @@ class WP_Test_REST_Widgets_Controller extends WP_Test_REST_Controller_Testcase {
|
||||
$data = $response->get_data();
|
||||
$properties = $data['schema']['properties'];
|
||||
|
||||
$this->assertSame( array( 'v1' => true ), $data['endpoints'][0]['allow_batch'] );
|
||||
|
||||
$this->assertCount( 7, $properties );
|
||||
$this->assertArrayHasKey( 'id', $properties );
|
||||
$this->assertArrayHasKey( 'id_base', $properties );
|
||||
|
||||
Reference in New Issue
Block a user