Changeset 44172 for trunk/tests/phpunit/tests/rest-api.php
- Timestamp:
- 12/14/2018 06:01:24 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/5.0 merged: 43833
- Property svn:mergeinfo changed
-
trunk/tests/phpunit/tests/rest-api.php
r44123 r44172 722 722 $this->assertTrue( is_array( rest_preload_api_request( 0, '/' ) ) ); 723 723 } 724 725 function test_rest_preload_api_request_with_method() { 726 $rest_server = $GLOBALS['wp_rest_server']; 727 $GLOBALS['wp_rest_server'] = null; 728 729 $preload_paths = array( 730 '/wp/v2/types', 731 array( '/wp/v2/media', 'OPTIONS' ), 732 ); 733 734 $preload_data = array_reduce( 735 $preload_paths, 736 'rest_preload_api_request', 737 array() 738 ); 739 740 $this->assertSame( array_keys( $preload_data ), array( '/wp/v2/types', 'OPTIONS' ) ); 741 $this->assertTrue( isset( $preload_data['OPTIONS']['/wp/v2/media'] ) ); 742 743 $GLOBALS['wp_rest_server'] = $rest_server; 744 } 724 745 }
Note: See TracChangeset
for help on using the changeset viewer.