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/meta/isProtectedMeta.php

    r54896 r55562  
    88
    99    /**
    10      * @dataProvider protected_data
     10     * @dataProvider data_is_protected_meta_true
    1111     */
    12     public function test_protected( $key ) {
     12    public function test_is_protected_meta_true( $key ) {
    1313        $this->assertTrue( is_protected_meta( $key ) );
    1414    }
    1515
    16     public function protected_data() {
     16    public function data_is_protected_meta_true() {
    1717        $protected_keys = array(
    1818            array( '_wp_attachment' ),
     
    3030
    3131    /**
    32      * @dataProvider unprotected_data
     32     * @dataProvider data_is_protected_meta_false
    3333     */
    34     public function test_unprotected( $key ) {
     34    public function test_is_protected_meta_false( $key ) {
    3535        $this->assertFalse( is_protected_meta( $key ) );
    3636    }
    3737
    38     public function unprotected_data() {
     38    public function data_is_protected_meta_false() {
    3939        $unprotected_keys = array(
    4040            array( 'singleword' ),
Note: See TracChangeset for help on using the changeset viewer.