Thiemo Mättig (WMDE) has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/234481

Change subject: No date parser should ever accept a day with no month
......................................................................

No date parser should ever accept a day with no month

This requires https://github.com/DataValues/Time/pull/88 to be merged
and released.

Change-Id: I6aee11d6a2acdf5edc3e24003a5712a5cac4b4c5
Fixes: T110647
---
M lib/tests/phpunit/parsers/TimeParserFactoryTest.php
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/81/234481/1

diff --git a/lib/tests/phpunit/parsers/TimeParserFactoryTest.php 
b/lib/tests/phpunit/parsers/TimeParserFactoryTest.php
index cc474f1..dbce22f 100644
--- a/lib/tests/phpunit/parsers/TimeParserFactoryTest.php
+++ b/lib/tests/phpunit/parsers/TimeParserFactoryTest.php
@@ -89,8 +89,8 @@
                         */
                        '+0000000000000000-01-01T00:00:00Z (Gregorian)' =>
                                array( '+0000-01-01T00:00:00Z' ),
-                       '+0-00-20T00:00:00Z' =>
-                               array( '+0000-00-20T00:00:00Z', 
TimeValue::PRECISION_DAY, $julian ),
+                       '+0-01-20T00:00:00Z' =>
+                               array( '+0000-01-20T00:00:00Z', 
TimeValue::PRECISION_DAY, $julian ),
                        '-10100-02-29' =>
                                array( '-10100-02-29T00:00:00Z', 
TimeValue::PRECISION_DAY, $julian ),
                        '+2015-01-00T00:00:00Z' =>
@@ -201,6 +201,9 @@
                        array( '1980America/New_York' ),
                        // A format YDM does not exist.
                        array( '1991 20 1' ),
+                       // No date parser should ever accept a day with no 
month.
+                       array( '2015-00-01' ),
+                       array( '+0-00-01T00:00:00Z' ),
                        // No date parser should ever magically turn HMS times 
into dates.
                        array( '12:31:59' ),
                        array( '23:12:31' ),

-- 
To view, visit https://gerrit.wikimedia.org/r/234481
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6aee11d6a2acdf5edc3e24003a5712a5cac4b4c5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to