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/formatting/sanitizeOrderby.php

    r53562 r55562  
    99
    1010    /**
    11      * @dataProvider valid_orderbys
     11     * @dataProvider data_sanitize_sql_orderby_valid
    1212     */
    13     public function test_valid( $orderby ) {
     13    public function test_sanitize_sql_orderby_valid( $orderby ) {
    1414        $this->assertSame( $orderby, sanitize_sql_orderby( $orderby ) );
    1515    }
    16     public function valid_orderbys() {
     16    public function data_sanitize_sql_orderby_valid() {
    1717        return array(
    1818            array( '1' ),
     
    3535
    3636    /**
    37      * @dataProvider invalid_orderbys
     37     * @dataProvider data_sanitize_sql_orderby_invalid
    3838     */
    39     public function test_invalid( $orderby ) {
     39    public function test_sanitize_sql_orderby_invalid( $orderby ) {
    4040        $this->assertFalse( sanitize_sql_orderby( $orderby ) );
    4141    }
    42     public function invalid_orderbys() {
     42    public function data_sanitize_sql_orderby_invalid() {
    4343        return array(
    4444            array( '' ),
Note: See TracChangeset for help on using the changeset viewer.