Browse Source

Fixed tests

migration/RELEASE_1_0_0
Dmitry Stogov 20 years ago
parent
commit
461f1d3c70
  1. 6
      ext/date/tests/bug35414.phpt
  2. 4
      ext/date/tests/bug35422.phpt
  3. 6
      ext/date/tests/bug35456.phpt
  4. 4
      ext/date/tests/bug35499.phpt
  5. 4
      ext/date/tests/date_create-3.phpt

6
ext/date/tests/bug35414.phpt

@ -4,9 +4,9 @@ Bug #35414 (strtotime() no longer works with ordinal suffix)
<?php
date_default_timezone_set("UTC");
echo date(DATE_ISO8601, strtotime("Sat 26th Nov 2005 18:18")) . "\n";
echo date(DATE_ISO8601, strtotime("Dec. 4th, 2005")) . "\n";
echo date(DATE_ISO8601, strtotime("December 4th, 2005")) . "\n";
echo date(date::ISO8601, strtotime("Sat 26th Nov 2005 18:18")) . "\n";
echo date(date::ISO8601, strtotime("Dec. 4th, 2005")) . "\n";
echo date(date::ISO8601, strtotime("December 4th, 2005")) . "\n";
?>
--EXPECT--
2004-12-26T18:18:00+0000

4
ext/date/tests/bug35422.phpt

@ -4,8 +4,8 @@ Bug #35422 (strtotime() does not parse times with UTC as timezone)
<?php
date_default_timezone_set("UTC");
echo date(DATE_ISO8601, strtotime("July 1, 2000 00:00:00 UTC")) . "\n";
echo date(DATE_ISO8601, strtotime("July 1, 2000 00:00:00 GMT")) . "\n";
echo date(date::ISO8601, strtotime("July 1, 2000 00:00:00 UTC")) . "\n";
echo date(date::ISO8601, strtotime("July 1, 2000 00:00:00 GMT")) . "\n";
?>
--EXPECT--
2000-07-01T00:00:00+0000

6
ext/date/tests/bug35456.phpt

@ -6,9 +6,9 @@ date_default_timezone_set("UTC");
$t = 1133216119;
echo date(DATE_ISO8601, strtotime("+ 1 day", $t)) . "\n";
echo date(DATE_ISO8601, strtotime("+ 1 month", $t)) . "\n";
echo date(DATE_ISO8601, strtotime("+ 1 week", $t)) . "\n";
echo date(date::ISO8601, strtotime("+ 1 day", $t)) . "\n";
echo date(date::ISO8601, strtotime("+ 1 month", $t)) . "\n";
echo date(date::ISO8601, strtotime("+ 1 week", $t)) . "\n";
?>
--EXPECT--
2005-11-29T22:15:19+0000

4
ext/date/tests/bug35499.phpt

@ -4,8 +4,8 @@ Bug #35499 (strtotime() does not handle whitespace around the date string)
<?php
date_default_timezone_set("UTC");
echo date(DATE_ISO8601, strtotime("11/20/2005 8:00 AM \r\n")) . "\n";
echo date(DATE_ISO8601, strtotime(" 11/20/2005 8:00 AM \r\n")) . "\n";
echo date(date::ISO8601, strtotime("11/20/2005 8:00 AM \r\n")) . "\n";
echo date(date::ISO8601, strtotime(" 11/20/2005 8:00 AM \r\n")) . "\n";
var_dump(strtotime(" a "));
var_dump(strtotime(" \n "));
?>

4
ext/date/tests/date_create-3.phpt

@ -5,8 +5,8 @@ date_create() function [3]
--FILE--
<?php
date_default_timezone_set("GMT");
echo date_format(date_create("Dec31 2005 +0100"), DATE_ISO8601), "\n";
echo date(DATE_ISO8601, strtotime("Dec31 2005 +0100")), "\n";
echo date_format(date_create("Dec31 2005 +0100"), date::ISO8601), "\n";
echo date(date::ISO8601, strtotime("Dec31 2005 +0100")), "\n";
?>
--EXPECT--
2005-12-31T00:00:00+0100

Loading…
Cancel
Save