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/sitemaps/functions.php

    r52010 r55562  
    6464         * Test get_sitemap_url() with plain permalinks.
    6565         *
    66          * @dataProvider plain_permalinks_provider
     66         * @dataProvider data_get_sitemap_url_plain_permalinks
    6767         */
    6868        public function test_get_sitemap_url_plain_permalinks( $name, $subtype_name, $page, $expected ) {
     
    7575         * Test get_sitemap_url() with pretty permalinks.
    7676         *
    77          * @dataProvider pretty_permalinks_provider
     77         * @dataProvider data_get_sitemap_url_pretty_permalinks
    7878         */
    7979        public function test_get_sitemap_url_pretty_permalinks( $name, $subtype_name, $page, $expected ) {
     
    9797         * }
    9898         */
    99         public function plain_permalinks_provider() {
     99        public function data_get_sitemap_url_plain_permalinks() {
    100100                return array(
    101101                        array( 'posts', 'post', 1, home_url( '/?sitemap=posts&sitemap-subtype=post&paged=1' ) ),
     
    129129         * }
    130130         */
    131         public function pretty_permalinks_provider() {
     131        public function data_get_sitemap_url_pretty_permalinks() {
    132132                return array(
    133133                        array( 'posts', 'post', 1, home_url( '/wp-sitemap-posts-post-1.xml' ) ),
Note: See TracChangeset for help on using the changeset viewer.