diff --git a/tests/phpunit/tests/rest-api/rest-schema-setup.php b/tests/phpunit/tests/rest-api/rest-schema-setup.php
index c286504..eea2224 100644
a
|
b
|
class WP_Test_REST_Schema_Initialization extends WP_Test_REST_TestCase { |
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 | 39 | |
| 40 | $routes = array_filter( array_keys( $routes ), array( $this, 'is_builtin_route' ) ); |
| 41 | |
40 | 42 | $expected_routes = array( |
41 | 43 | '/', |
42 | 44 | '/oembed/1.0', |
… |
… |
class WP_Test_REST_Schema_Initialization extends WP_Test_REST_TestCase { |
70 | 72 | '/wp/v2/settings', |
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 | |
76 | 86 | public function test_build_wp_api_client_fixtures() { |