Re: cvs: php-src(PHP_5_2) /ext/date/tests bug37514.phpt oo_002.phpt
| From: | Hannes Magnusson | Date: | Sat, 06 Jan 2007 19:51:27 +0000 |
| Subject: | Re: cvs: php-src(PHP_5_2) /ext/date/tests bug37514.phpt oo_002.phpt | ||
| References: | 1 2 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-42591@lists.php.net to get a copy of this message | ||
Hi Marcus
The test is checking if strtotime() assumes correct year, therefor we
need to check if it prints correct year and weekday... Matching it
against simply "any weekday" and "any year" kinda defeats the purpose
of the test.
-Hannes
On 1/6/07, Marcus Boerger <helly@php.net> wrote:
Hello Hannes, could we not simply use regex verification using --EXPECTREGEX-- ? best regards marcus Friday, January 5, 2007, 4:21:45 PM, you wrote:bjori Fri Jan 5 15:21:45 2007 UTCModified files: (Branch: PHP_5_2) /php-src/ext/date/tests bug37514.phpt oo_002.phptLog: Fix tests #We'll need to update these every year.. http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/bug37514.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/date/tests/bug37514.phpt diff -u php-src/ext/date/tests/bug37514.phpt:1.1.2.2 php-src/ext/date/tests/bug37514.phpt:1.1.2.3--- php-src/ext/date/tests/bug37514.phpt:1.1.2.2 Wed Jan 3 13:48:54 2007 +++ php-src/ext/date/tests/bug37514.phpt Fri Jan 5 15:21:45 2007@@ -11,10 +11,10 @@ echo date('r', strtotime('May 18th 5:05 am')), "\n"; echo date('r', strtotime('May 18th 2006 5:05pm')), "\n"; ?> ---EXPECTF-- -Thu, 18 May %d 05:05:00 +0000 -Thu, 18 May %d 17:05:00 +0000 -Thu, 18 May %d 17:05:00 +0000 -Thu, 18 May %d 05:05:00 +0000 -Thu, 18 May %d 05:05:00 +0000 -Thu, 18 May %d 17:05:00 +0000 +--EXPECT-- +Fri, 18 May 2007 05:05:00 +0000 +Fri, 18 May 2007 17:05:00 +0000 +Fri, 18 May 2007 17:05:00 +0000 +Fri, 18 May 2007 05:05:00 +0000 +Fri, 18 May 2007 05:05:00 +0000 +Thu, 18 May 2006 17:05:00 +0000 http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/oo_002.phpt?r1=1.1.2.4&r2=1.1.2.5&diff_format=u Index: php-src/ext/date/tests/oo_002.phpt diff -u php-src/ext/date/tests/oo_002.phpt:1.1.2.4 php-src/ext/date/tests/oo_002.phpt:1.1.2.5 --- php-src/ext/date/tests/oo_002.phpt:1.1.2.4 Wed Jan 3 13:47:11 2007 +++ php-src/ext/date/tests/oo_002.phpt Fri Jan 5 15:21:45 2007 @@ -19,10 +19,10 @@ $c = clone $t; var_dump($c->getName()); ?> ---EXPECTF-- -string(29) "Tue, 01 Aug %d 13:00:00 +0000" -string(29) "Tue, 01 Aug %d 13:00:00 +0000" -string(29) "Tue, 01 Aug %d 14:00:00 +0000" -string(29) "Tue, 01 Aug %d 12:59:59 +0000" +--EXPECT-- +string(29) "Wed, 01 Aug 07 13:00:00 +0000" +string(29) "Wed, 01 Aug 07 13:00:00 +0000" +string(29) "Wed, 01 Aug 07 14:00:00 +0000" +string(29) "Wed, 01 Aug 07 12:59:59 +0000" string(10) "Asia/Tokyo" string(10) "Asia/Tokyo" Best regards, Marcus