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/user/capabilities.php

    r54865 r55562  
    13151315    }
    13161316
    1317     public function authorless_post_statuses() {
    1318         return array( array( 'draft' ), array( 'private' ), array( 'publish' ) );
    1319     }
    1320 
    13211317    /**
    13221318     * @ticket 27020
    1323      * @dataProvider authorless_post_statuses
     1319     * @dataProvider data_authorless_post
    13241320     */
    13251321    public function test_authorless_post( $status ) {
     
    13481344        $this->assertFalse( $contributor->has_cap( 'delete_post', $post ) );
    13491345        $this->assertSame( 'publish' === $status, $contributor->has_cap( 'read_post', $post ) );
     1346    }
     1347
     1348    public function data_authorless_post() {
     1349        return array( array( 'draft' ), array( 'private' ), array( 'publish' ) );
    13501350    }
    13511351
Note: See TracChangeset for help on using the changeset viewer.