Changeset 47843 for branches/5.4/tests/phpunit/tests/rest-api.php
- Timestamp:
- 05/22/2020 08:58:50 PM (6 years ago)
- Location:
- branches/5.4
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
tests/phpunit/tests/rest-api.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/5.4
-
branches/5.4/tests/phpunit/tests/rest-api.php
r47563 r47843 955 955 public function test_rest_parse_embed_param( $expected, $embed ) { 956 956 $this->assertEquals( $expected, rest_parse_embed_param( $embed ) ); 957 } 958 959 /** 960 * @ticket 49749 961 */ 962 public function test_register_route_with_invalid_namespace() { 963 $this->setExpectedIncorrectUsage( 'register_rest_route' ); 964 965 register_rest_route( 966 '/my-namespace/v1/', 967 '/my-route', 968 array( 969 'callback' => '__return_true', 970 ) 971 ); 972 973 $routes = rest_get_server()->get_routes( 'my-namespace/v1' ); 974 $this->assertCount( 2, $routes ); 975 976 $this->assertTrue( rest_do_request( '/my-namespace/v1/my-route' )->get_data() ); 957 977 } 958 978
Note: See TracChangeset
for help on using the changeset viewer.