Skip to content

Commit 0373219

Browse files
committed
Test both permalink types
1 parent 68a2989 commit 0373219

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/wp-includes/rest-api/auth/class-test-wp-rest-key-pair.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ public function test_init() {
112112
*/
113113
public function test_get_rest_uri() {
114114
$this->assertEquals( '/wp-json/wp/v2/key-pair', WP_REST_Key_Pair::get_rest_uri() );
115+
116+
add_filter( 'default_option_permalink_structure', '__return_false', 20, 0 );
117+
$this->assertEquals( '/index.php?rest_route=/wp/v2/key-pair', WP_REST_Key_Pair::get_rest_uri() );
118+
remove_filter( 'default_option_permalink_structure', '__return_false', 20 );
115119
}
116120

117121
public function defaultPermalinkStyle() {

0 commit comments

Comments
 (0)