Make WordPress Core


Ignore:
Timestamp:
03/19/2023 12:03:30 PM (3 years 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/wpRestTemplatesController.php

    r55457 r55562  
    170170        /**
    171171         * @ticket 54507
    172          * @dataProvider get_template_endpoint_urls
     172         * @dataProvider data_get_item_works_with_a_single_slash
    173173         */
    174174        public function test_get_item_works_with_a_single_slash( $endpoint_url ) {
     
    204204        }
    205205
    206         public function get_template_endpoint_urls() {
     206        public function data_get_item_works_with_a_single_slash() {
    207207                return array(
    208208                        array( '/wp/v2/templates/default/my_template' ),
     
    376376        /**
    377377         * @ticket 54507
    378          * @dataProvider get_template_ids_to_sanitize
     378         * @dataProvider data_sanitize_template_id
    379379         */
    380380        public function test_sanitize_template_id( $input_id, $sanitized_id ) {
     
    386386        }
    387387
    388         public function get_template_ids_to_sanitize() {
     388        public function data_sanitize_template_id() {
    389389                return array(
    390390                        array( 'tt1-blocks/index', 'tt1-blocks//index' ),
Note: See TracChangeset for help on using the changeset viewer.