You appear to be a bot. Output may be restricted
Description
Usage
Tests_Canonical_NoRewrite::data();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/canonical/noRewrite.php
Lines:
1 to 100 of 246
function data() { /* Format: * [0]: $test_url, * [1]: expected results: Any of the following can be used * array( 'url': expected redirection location, 'qv': expected query vars to be set via the rewrite AND $_GET ); * array( expected query vars to be set, same as 'qv' above ) * (string) expected redirect location * [3]: (optional) The ticket the test refers to, Can be skipped if unknown. */ return array( array( '/?p=123', '/?p=123' ), // This post_type arg should be stripped, because p=1 exists, and does not have post_type= in its query string array( '/?post_type=fake-cpt&p=1', '/?p=1' ), // Strip an existing but incorrect post_type arg array( '/?post_type=page&page_id=1', '/?p=1' ), // Trailing spaces and punctuation in query string args. array( '/?p=358 ', array( 'url' => '/?p=358', 'qv' => array( 'p' => '358' ), ), 20383, ), // space array( '/?p=358%20', array( 'url' => '/?p=358', 'qv' => array( 'p' => '358' ), ), 20383, ), // encoded space array( '/?p=358!', array( 'url' => '/?p=358', 'qv' => array( 'p' => '358' ), ), 20383, ), // exclamation mark array( '/?p=358%21', array( 'url' => '/?p=358', 'qv' => array( 'p' => '358' ), ), 20383, ), // encoded exclamation mark array( '/?p=358"', array( 'url' => '/?p=358', 'qv' => array( 'p' => '358' ), ), 20383, ), // double quote array( '/?p=358%22', array( 'url' => '/?p=358', 'qv' => array( 'p' => '358' ), ), 20383, ), // encoded double quote array( '/?p=358\'', array( 'url' => '/?p=358', 'qv' => array( 'p' => '358' ), ), 20383, ), // single quote array( '/?p=358%27', array( 'url' => '/?p=358', 'qv' => array( 'p' => '358' ), ), 20383, ), // encoded single quote array( '/?p=358(', array( 'url' => '/?p=358', 'qv' => array( 'p' => '358' ), ), 20383, ), // opening bracket array( '/?p=358%28', array( 'url' => '/?p=358', 'qv' => array( 'p' => '358' ), ), 20383, ), // encoded opening bracket array(