Changeset 47224 for trunk/tests/phpunit/tests/rest-api.php
- Timestamp:
- 02/09/2020 08:52:06 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api.php
r47122 r47224 907 907 $this->assertEquals( 'GET', $request->get_method() ); 908 908 } 909 910 /** 911 * @dataProvider _dp_rest_parse_embed_param 912 */ 913 public function test_rest_parse_embed_param( $expected, $embed ) { 914 $this->assertEquals( $expected, rest_parse_embed_param( $embed ) ); 915 } 916 917 public function _dp_rest_parse_embed_param() { 918 return array( 919 array( true, '' ), 920 array( true, null ), 921 array( true, '1' ), 922 array( true, 'true' ), 923 array( true, array() ), 924 array( array( 'author' ), 'author' ), 925 array( array( 'author', 'replies' ), 'author,replies' ), 926 array( array( 'author', 'replies' ), 'author,replies ' ), 927 array( array( 'wp:term' ), 'wp:term' ), 928 array( array( 'wp:term', 'wp:attachment' ), 'wp:term,wp:attachment' ), 929 array( array( 'author' ), array( 'author' ) ), 930 array( array( 'author', 'replies' ), array( 'author', 'replies' ) ), 931 array( array( 'https://api.w.org/term' ), 'https://api.w.org/term' ), 932 array( array( 'https://api.w.org/term', 'https://api.w.org/attachment' ), 'https://api.w.org/term,https://api.w.org/attachment' ), 933 array( array( 'https://api.w.org/term', 'https://api.w.org/attachment' ), array( 'https://api.w.org/term', 'https://api.w.org/attachment' ) ), 934 ); 935 } 909 936 }
Note: See TracChangeset
for help on using the changeset viewer.