cvs: pear-core /tests/PEAR_Validate test_validate_date.phpt

From: Date: Sun, 21 Aug 2005 03:42:48 +0000
Subject: cvs: pear-core /tests/PEAR_Validate test_validate_date.phpt
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-3671@lists.php.net to get a copy of this message
cellog Sat Aug 20 23:42:48 2005 EDT Modified files: /pear-core/tests/PEAR_Validate test_validate_date.phpt Log: PHP 5.1 no longer has a limit on the year (it successfully parses a date containing a year with 30000 digits) so remove the portion of the test that looks for this http://cvs.php.net/diff.php/pear-core/tests/PEAR_Validate/test_validate_date.phpt?r1=1.2&r2=1.3&ty=u Index: pear-core/tests/PEAR_Validate/test_validate_date.phpt diff -u pear-core/tests/PEAR_Validate/test_validate_date.phpt:1.2 pear-core/tests/PEAR_Validate/test_validate_date.phpt:1.3 --- pear-core/tests/PEAR_Validate/test_validate_date.phpt:1.2 Mon Dec 6 11:33:12 2004 +++ pear-core/tests/PEAR_Validate/test_validate_date.phpt Sat Aug 20 23:42:44 2005 @@ -377,9 +377,10 @@ ), ), $val->getFailures(), 'failures 2004-04-0'); -$pf->setDate('4002-04-05'); +/* this portion no longer fails on PHP 5.1 +$pf->setDate(str_repeat('141341', 5000) . '-04-05'); $res = $val->validate(PEAR_VALIDATE_NORMAL); -$phpunit->assertFalse($res, '4002-04-05'); +$phpunit->assertFalse($res, 'way future-04-05'); $phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => @@ -390,11 +391,11 @@ 0 => array ( 'field' => 'date', - 'reason' => 'invalid release date "4002-04-05"', + 'reason' => 'invalid release date "' . str_repeat('141341', 5000) . '-04-05"', ), ), -), $val->getFailures(), 'failures 4002-04-05'); - +), $val->getFailures(), 'failures way future-04-05'); +*/ $pf->setDate('2004-04-05'); $res = $val->validate(PEAR_VALIDATE_NORMAL); $phpunit->assertTrue($res, '2004-04-05');

« previous php.pear.core (#3671) next »