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/rest-api/rest-server.php

    r55457 r55562  
    5050    }
    5151
     52    public function filter_wp_rest_server_class() {
     53        return 'Spy_REST_Server';
     54    }
     55
    5256    public function test_envelope() {
    5357        $data    = array(
     
    10051009
    10061010    /**
    1007      * @dataProvider _dp_response_to_data_embedding
     1011     * @dataProvider data_response_to_data_embedding
    10081012     */
    10091013    public function test_response_to_data_embedding( $expected, $embed ) {
     
    10231027    }
    10241028
    1025     public function _dp_response_to_data_embedding() {
     1029    public function data_response_to_data_embedding() {
    10261030        return array(
    10271031            array(
     
    14601464        $result = rest_get_server()->serve_request( '/test/data\\with\\slashes' );
    14611465        $this->assertSame( 'data\\with\\slashes', rest_get_server()->last_request->get_header( 'x_my_header' ) );
    1462     }
    1463 
    1464     public function filter_wp_rest_server_class() {
    1465         return 'Spy_REST_Server';
    14661466    }
    14671467
Note: See TracChangeset for help on using the changeset viewer.