WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/09/2016 07:12:01 AM (4 years ago)
Author:
rmccue
Message:

REST API: Include template in all post type schemas.

[38951] added templates to all post types, but didn't add them to the schema.

Props swissspidy.
Fixes #38698.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api/rest-attachments-controller.php

    r39160 r39182  
    10421042        $data = $response->get_data();
    10431043        $properties = $data['schema']['properties'];
    1044         $this->assertEquals( 23, count( $properties ) );
     1044        $this->assertEquals( 24, count( $properties ) );
    10451045        $this->assertArrayHasKey( 'author', $properties );
    10461046        $this->assertArrayHasKey( 'alt_text', $properties );
     
    10681068        $this->assertArrayHasKey( 'slug', $properties );
    10691069        $this->assertArrayHasKey( 'source_url', $properties );
     1070        $this->assertArrayHasKey( 'template', $properties );
    10701071        $this->assertArrayHasKey( 'title', $properties );
    10711072        $this->assertArrayHasKey( 'raw', $properties['title']['properties'] );
Note: See TracChangeset for help on using the changeset viewer.