- Timestamp:
- 12/14/2021 06:22:07 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/wpRestTemplatesController.php
r52275 r52376 54 54 } 55 55 56 /** 57 * @covers WP_REST_Templates_Controller::register_routes 58 * @ticket 54596 59 */ 56 60 public function test_register_routes() { 57 61 $routes = rest_get_server()->get_routes(); 58 $this->assertArrayHasKey( '/wp/v2/templates', $routes ); 59 $this->assertArrayHasKey( '/wp/v2/templates/(?P<id>[\/\w-]+)', $routes ); 62 $this->assertArrayHasKey( 63 '/wp/v2/templates', 64 $routes, 65 'Templates route does not exist' 66 ); 67 $this->assertArrayHasKey( 68 '/wp/v2/templates/(?P<id>[\/\s%\w\.\(\)\[\]\@_\-]+)', 69 $routes, 70 'Single template based on the given ID route does not exist' 71 ); 60 72 } 61 73
Note: See TracChangeset
for help on using the changeset viewer.