- Timestamp:
- 02/23/2017 03:49:44 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-schema-setup.php
r40077 r40104 37 37 $this->assertTrue( is_array( $routes ), '`get_routes` should return an array.' ); 38 38 $this->assertTrue( ! empty( $routes ), 'Routes should not be empty.' ); 39 40 $routes = array_filter( array_keys( $routes ), array( $this, 'is_builtin_route' ) ); 39 41 40 42 $expected_routes = array( … … 71 73 ); 72 74 73 $this->assertEquals( $expected_routes, array_keys( $routes ) ); 75 $this->assertEquals( $expected_routes, $routes ); 76 } 77 78 private function is_builtin_route( $route ) { 79 return ( 80 '/' === $route || 81 preg_match( '#^/oembed/1\.0(/.+)?$#', $route ) || 82 preg_match( '#^/wp/v2(/.+)?$#', $route ) 83 ); 74 84 } 75 85
Note: See TracChangeset
for help on using the changeset viewer.