Make WordPress Core

Changeset 36714


Ignore:
Timestamp:
02/25/2016 09:55:57 PM (9 years ago)
Author:
johnbillion
Message:

Canonical: Improve the method names and inline docs for canonical redirect tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/canonical.php

    r35191 r36714  
    2424
    2525    /**
    26      * @dataProvider data
     26     * @dataProvider data_canonical
    2727     */
    28     function test( $test_url, $expected, $ticket = 0, $expected_doing_it_wrong = array() ) {
     28    function test_canonical( $test_url, $expected, $ticket = 0, $expected_doing_it_wrong = array() ) {
    2929
    3030        if ( false !== strpos( $test_url, '%d' ) ) {
     
    3838    }
    3939
    40     function data() {
     40    function data_canonical() {
    4141        /* Data format:
    42          * [0]: $test_url,
     42         * [0]: Test URL.
    4343         * [1]: expected results: Any of the following can be used
    4444         *      array( 'url': expected redirection location, 'qv': expected query vars to be set via the rewrite AND $_GET );
     
    4646         *      (string) expected redirect location
    4747         * [2]: (optional) The ticket the test refers to, Can be skipped if unknown.
     48         * [3]: (optional) Array of class/function names expected to throw `_doing_it_wrong()` notices.
    4849         */
    4950
Note: See TracChangeset for help on using the changeset viewer.