svn: /php/php-src/branches/PHP_5_3/ext/date/tests/ bug51994.phpt
| From: | Kai Schröder | Date: | Sat, 17 Jul 2010 22:17:48 +0000 |
| Subject: | svn: /php/php-src/branches/PHP_5_3/ext/date/tests/ bug51994.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-63156@lists.php.net to get a copy of this message | ||
k.schroeder Sat, 17 Jul 2010 22:17:48 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=301358
Log:
Test for #51994
Bug: http://bugs.php.net/51994 (Assigned)
date_parse_from_format parsing invalid date
Changed paths:
A php/php-src/branches/PHP_5_3/ext/date/tests/bug51994.phpt
Added: php/php-src/branches/PHP_5_3/ext/date/tests/bug51994.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/date/tests/bug51994.phpt (rev 0)
+++ php/php-src/branches/PHP_5_3/ext/date/tests/bug51994.phpt 2010-07-17 22:17:48 UTC (rev 301358)
@@ -0,0 +1,38 @@
+--TEST--
+Bug #51994 (date_parse_from_format is parsing invalid date using 'yz' format)
+--FILE--
+<?php
+$trans_date = '10153'; // 152nd day of year 2010 -> 03.06.2010
+$a_date = date_parse_from_format('yz', $trans_date);
+
+var_dump($a_date);
+?>
+--EXPECTF--
+array(12) {
+ ["year"]=>
+ int(2010)
+ ["month"]=>
+ int(6)
+ ["day"]=>
+ int(3)
+ ["hour"]=>
+ bool(false)
+ ["minute"]=>
+ bool(false)
+ ["second"]=>
+ bool(false)
+ ["fraction"]=>
+ bool(false)
+ ["warning_count"]=>
+ int(0)
+ ["warnings"]=>
+ array(0) {
+ }
+ ["error_count"]=>
+ int(0)
+ ["errors"]=>
+ array(0) {
+ }
+ ["is_localtime"]=>
+ bool(false)
+}
\ No newline at end of file
Property changes on: php/php-src/branches/PHP_5_3/ext/date/tests/bug51994.phpt
___________________________________________________________________
Added: svn:keywords
+ Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL
Added: svn:eol-style
+ native