Changeset 47122 for trunk/tests/phpunit/tests/canonical/customRules.php
- Timestamp:
- 01/29/2020 12:43:23 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/canonical/customRules.php
r46586 r47122 12 12 global $wp_rewrite; 13 13 // Add a custom Rewrite rule to test category redirections. 14 $wp_rewrite->add_rule( 'ccr/(.+?)/sort/(asc|desc)', 'index.php?category_name=$matches[1]&order=$matches[2]', 'top' ); // ccr = Custom_Cat_Rule 14 $wp_rewrite->add_rule( 'ccr/(.+?)/sort/(asc|desc)', 'index.php?category_name=$matches[1]&order=$matches[2]', 'top' ); // ccr = Custom_Cat_Rule. 15 15 $wp_rewrite->flush_rules(); 16 16 } … … 24 24 25 25 function data() { 26 /* Format: 27 * [0]: $test_url, 28 * [1]: expected results: Any of the following can be used 26 /* 27 * Data format: 28 * [0]: Test URL. 29 * [1]: Expected results: Any of the following can be used. 29 30 * array( 'url': expected redirection location, 'qv': expected query vars to be set via the rewrite AND $_GET ); 30 31 * array( expected query vars to be set, same as 'qv' above ) … … 33 34 */ 34 35 return array( 35 // Custom Rewrite rules leading to Categories 36 // Custom Rewrite rules leading to Categories. 36 37 array( 37 38 '/ccr/uncategorized/sort/asc/',
Note: See TracChangeset
for help on using the changeset viewer.