cvs: pear-core /tests/PEAR_Validate test_validate_time.phpt
| From: | Greg Beaver | Date: | Sun, 21 Aug 2005 03:52:16 +0000 |
| Subject: | cvs: pear-core /tests/PEAR_Validate test_validate_time.phpt | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-3675@lists.php.net to get a copy of this message | ||
cellog Sat Aug 20 23:52:16 2005 EDT
Modified files:
/pear-core/tests/PEAR_Validate test_validate_time.phpt
Log:
this seems fishy, 2500000:30:50 is a valid time in PHP 5.1?!
http://cvs.php.net/diff.php/pear-core/tests/PEAR_Validate/test_validate_time.phpt?r1=1.2&r2=1.3&ty=u
Index: pear-core/tests/PEAR_Validate/test_validate_time.phpt
diff -u pear-core/tests/PEAR_Validate/test_validate_time.phpt:1.2
pear-core/tests/PEAR_Validate/test_validate_time.phpt:1.3
--- pear-core/tests/PEAR_Validate/test_validate_time.phpt:1.2 Mon Dec 6 11:33:12 2004
+++ pear-core/tests/PEAR_Validate/test_validate_time.phpt Sat Aug 20 23:52:11 2005
@@ -376,9 +376,10 @@
),
), $val->getFailures(), 'failures 20:3:50');
-$pf->setTime('25:30:50');
+/* this should fail, but doesn't in PHP 5.1, bug?
+$pf->setTime('2500000:30:50');
$res = $val->validate(PEAR_VALIDATE_NORMAL);
-$phpunit->assertFalse($res, '25:30:50');
+$phpunit->assertFalse($res, '2500000:30:50');
$phpunit->showall();
$phpunit->assertEquals(array (
'warnings' =>
@@ -389,11 +390,11 @@
0 =>
array (
'field' => 'time',
- 'reason' => 'invalid release time "25:30:50"',
+ 'reason' => 'invalid release time "2500000:30:50"',
),
),
-), $val->getFailures(), 'failures 25:30:50');
-
+), $val->getFailures(), 'failures 2500000:30:50');
+*/
$pf->setTime('16:30:50');
$res = $val->validate(PEAR_VALIDATE_NORMAL);
$phpunit->assertTrue($res, '16:30:50');