Make WordPress Core


Ignore:
Timestamp:
03/19/2023 12:03:30 PM (21 months ago)
Author:
SergeyBiryukov
Message:

Tests: Use the data_ prefix for various data provider methods.

This aims to bring more consistency to the test suite, as the vast majority of data providers already use that prefix.

Includes moving some data providers next to the tests they are used in.

Follow-up to [55464].

See #57841.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rewrite/rewriteTags.php

    r51568 r55562  
    2121    }
    2222
    23     public function _invalid_rewrite_tags() {
    24         return array(
    25             array( 'foo', 'bar' ),
    26             array( '%', 'bar' ),
    27             array( '%a', 'bar' ),
    28             array( 'a%', 'bar' ),
    29             array( '%%', 'bar' ),
    30             array( '', 'bar' ),
    31         );
    32     }
    33 
    3423    /**
    35      * @dataProvider _invalid_rewrite_tags
     24     * @dataProvider data_add_rewrite_tag_invalid
    3625     *
    3726     * @param string $tag   Rewrite tag.
     
    4534        $this->assertSameSets( $this->rewritereplace, $wp_rewrite->rewritereplace );
    4635        $this->assertSameSets( $this->queryreplace, $wp_rewrite->queryreplace );
     36    }
     37
     38    public function data_add_rewrite_tag_invalid() {
     39        return array(
     40            array( 'foo', 'bar' ),
     41            array( '%', 'bar' ),
     42            array( '%a', 'bar' ),
     43            array( 'a%', 'bar' ),
     44            array( '%%', 'bar' ),
     45            array( '', 'bar' ),
     46        );
    4747    }
    4848
Note: See TracChangeset for help on using the changeset viewer.