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/formatting/date.php

    r54230 r55562  
    131131     * @ticket 31809
    132132     *
    133      * @dataProvider timezone_provider
    134      *
    135      * @covers ::get_gmt_from_date
    136      */
    137     public function test_gmt_from_date_correct_time( $timezone_string, $gmt_offset ) {
     133     * @dataProvider data_timezone_provider
     134     *
     135     * @covers ::get_gmt_from_date
     136     */
     137    public function test_get_gmt_from_date_correct_time( $timezone_string, $gmt_offset ) {
    138138        update_option( 'timezone_string', $timezone_string );
    139139        update_option( 'gmt_offset', $gmt_offset );
     
    149149     * @ticket 31809
    150150     *
    151      * @dataProvider timezone_provider
    152      *
    153      * @covers ::get_date_from_gmt
    154      */
    155     public function test_date_from_gmt_correct_time( $timezone_string, $gmt_offset ) {
     151     * @dataProvider data_timezone_provider
     152     *
     153     * @covers ::get_date_from_gmt
     154     */
     155    public function test_get_date_from_gmt_correct_time( $timezone_string, $gmt_offset ) {
    156156        update_option( 'timezone_string', $timezone_string );
    157157        update_option( 'gmt_offset', $gmt_offset );
     
    167167     * @ticket 31809
    168168     *
    169      * @dataProvider timezone_provider
     169     * @dataProvider data_timezone_provider
    170170     *
    171171     * @covers ::iso8601_to_datetime
     
    231231     * @return array
    232232     */
    233     public function timezone_provider() {
     233    public function data_timezone_provider() {
    234234        return array(
    235235            array(
Note: See TracChangeset for help on using the changeset viewer.