• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WordPress develop tests

WordPress develop tests

WordPress develop tests a2z

  • Home
  • Plugins
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / Tests_Canonical_NoRewrite::data() –

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(
[1] [2] [3] Next »

 View on GitHub

Published: 26th November 2019 | Last updated: 27th November 2019

Primary Sidebar

Information

Function name: Tests_Canonical_NoRewrite::data
Class ref: Tests_Canonical_NoRewrite
Plugin ref: WordPress develop tests
Version: 5.3
Sourcefile: phpunit/tests/canonical/noRewrite.php
File ref: phpunit/tests/canonical/noRewrite.php
Deprecated?: No
API Letters: C,D,N,T

Footer

WordPress develop tests
WordPress develop tests
WordPress develop tests a2z
WordPress 5.6
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  develop.wp-a2z.org
© Copyright WordPress develop tests 2014-2021. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites