Ticket #36790: 36790.skip-tests.patch
File 36790.skip-tests.patch, 1.0 KB (added by , 7 years ago) |
---|
-
tests/phpunit/tests/functions/maybeDeclineDate.php
34 34 parent::tearDown(); 35 35 } 36 36 37 private function is_preg_match_unicode_aware() { 38 static $is_preg_match_unicode_aware = null; 39 40 if ( ! isset( $is_preg_match_unicode_aware ) ) { 41 $is_preg_match_unicode_aware = (bool) preg_match( '#^\d{1,2}\.? \w+#u', '21 Июнь' ); 42 } 43 44 return $is_preg_match_unicode_aware; 45 } 46 37 47 /** 38 48 * @ticket 36790 39 49 * @dataProvider data_wp_maybe_decline_date 40 50 */ 41 51 public function test_wp_maybe_decline_date( $test_locale, $input, $output ) { 52 if ( ! $this->is_preg_match_unicode_aware() ) { 53 $this->markTestSkipped( 'preg_match() is not unicode aware.' ); 54 } 55 42 56 global $locale, $wp_locale; 43 57 44 58 add_filter( 'gettext_with_context', array( $this, 'filter__enable_months_names_declension' ), 10, 3 );