Make WordPress Core

Changeset 47076


Ignore:
Timestamp:
01/17/2020 12:54:02 AM (7 years ago)
Author:
SergeyBiryukov
Message:

Tests: Move wp_maybe_decline_date() tests to the date directory.

See #48934.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/date/maybeDeclineDate.php

    r47075 r47076  
    4242         * @dataProvider data_wp_maybe_decline_date
    4343         */
    44         public function test_wp_maybe_decline_date( $test_locale, $input, $output ) {
     44        public function test_wp_maybe_decline_date( $test_locale, $format, $input, $output ) {
    4545                global $locale, $wp_locale;
    4646
     
    5353                $wp_locale->month_genitive = $month_names['month_genitive'];
    5454
    55                 $declined_date = wp_maybe_decline_date( $input );
     55                $declined_date = wp_maybe_decline_date( $input, $format );
    5656
    5757                remove_filter( 'gettext_with_context', array( $this, 'filter__enable_months_names_declension' ), 10 );
     
    7070        public function data_wp_maybe_decline_date() {
    7171                return array(
    72                         array( 'ru_RU', '21 Июнь', '21 июня' ),
    73                         array( 'ru_RU', '1 Январь 2016', '1 января 2016' ),
    74                         array( 'ru_RU', 'Январь 1st 2016', '1 января 2016' ),
    75                         array( 'ru_RU', 'Январь 1 2016', '1 января 2016' ),
    76                         array( 'ru_RU', 'Январь 1 16', '1 января 16' ),
    77                         array( 'ru_RU', 'Суббота, 19 Январь 2019 10:50', 'Суббота, 19 января 2019 10:50' ),
    78                         array( 'pl_PL', '1 Styczeń', '1 stycznia' ),
    79                         array( 'hr', '1. Siječanj', '1. siječnja' ),
    80                         array( 'ca', '1 de abril', "1 d'abril" ),
    81                         array( 'cs_CZ', '1. Červen', '1. června' ),
    82                         array( 'cs_CZ', '1. Červenec', '1. července' ),
    83                         array( 'it_IT', 'Lundeì 11 Novembre 2019', 'Lundeì 11 Novembre 2019' ),
    84                         array( 'el', 'Σάββατο, 19 Ιανουάριος 2019 10:50', 'Σάββατο, 19 Ιανουαρίου 2019 10:50' ),
     72                        array( 'ru_RU', 'j F', '21 Июнь', '21 июня' ),
     73                        array( 'ru_RU', 'j F Y', '1 Январь 2016', '1 января 2016' ),
     74                        array( 'ru_RU', 'F jS Y', 'Январь 1st 2016', '1 января 2016' ),
     75                        array( 'ru_RU', 'F j Y', 'Январь 1 2016', '1 января 2016' ),
     76                        array( 'ru_RU', 'F j y', 'Январь 1 16', '1 января 16' ),
     77                        array( 'ru_RU', 'F y', 'Январь 16', 'Январь 16' ),
     78                        array( 'ru_RU', 'l, d F Y H:i', 'Суббота, 19 Январь 2019 10:50', 'Суббота, 19 января 2019 10:50' ),
     79                        array( 'pl_PL', 'j F', '1 Styczeń', '1 stycznia' ),
     80                        array( 'hr', 'j. F', '1. Siječanj', '1. siječnja' ),
     81                        array( 'ca', 'j F', '1 de abril', "1 d'abril" ),
     82                        array( 'cs_CZ', 'j. F', '1. Červen', '1. června' ),
     83                        array( 'cs_CZ', 'j. F', '1. Červenec', '1. července' ),
     84                        array( 'it_IT', 'l j F Y', 'Lundeì 11 Novembre 2019', 'Lundeì 11 Novembre 2019' ),
     85                        array( 'el', 'l, d F Y H:i', 'Σάββατο, 19 Ιανουάριος 2019 10:50', 'Σάββατο, 19 Ιανουαρίου 2019 10:50' ),
    8586                );
    8687        }
Note: See TracChangeset for help on using the changeset viewer.