Changeset 38790 for trunk/tests/phpunit/tests/rest-api.php
- Timestamp:
- 10/14/2016 07:29:08 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api.php
r38771 r38790 276 276 public function test_rest_url_generation() { 277 277 // In pretty permalinks case, we expect a path of wp-json/ with no query. 278 update_option( 'permalink_structure','/%year%/%monthnum%/%day%/%postname%/' );278 $this->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' ); 279 279 $this->assertEquals( 'http://' . WP_TESTS_DOMAIN . '/wp-json/', get_rest_url() ); 280 280 281 update_option( 'permalink_structure', '' ); 281 // In index permalinks case, we expect a path of index.php/wp-json/ with no query. 282 $this->set_permalink_structure( '/index.php/%year%/%monthnum%/%day%/%postname%/' ); 283 $this->assertEquals( 'http://' . WP_TESTS_DOMAIN . '/index.php/wp-json/', get_rest_url() ); 284 282 285 // In non-pretty case, we get a query string to invoke the rest router. 286 $this->set_permalink_structure( '' ); 283 287 $this->assertEquals( 'http://' . WP_TESTS_DOMAIN . '/?rest_route=/', get_rest_url() ); 284 288
Note: See TracChangeset
for help on using the changeset viewer.