Browse Source

Separate test for %a is no longer needed.

pull/7/head
Daniel Convissor 15 years ago
parent
commit
f15c453242
  1. 7
      ext/date/tests/DateInterval_format.phpt
  2. 25
      ext/date/tests/DateInterval_format_a.phpt

7
ext/date/tests/DateInterval_format.phpt

@ -1,8 +1,5 @@
--TEST--
DateInterval::format(), except %a
--DESCRIPTION--
%a is covered in a separate test.
Don't want an XFAIL here to cause confusion if a real bug comes up.
DateInterval::format()
--CREDITS--
Daniel Convissor <danielc@php.net>
# TestFest 2010 BKTK
@ -32,6 +29,7 @@ echo $interval->format('h=%h') . "\n";
echo $interval->format('i=%i') . "\n";
echo $interval->format('s=%s') . "\n";
echo $interval->format('r=%r') . "\n";
echo $interval->format('a=%a') . "\n";
echo "\n";
@ -63,6 +61,7 @@ h=4
i=5
s=6
r=
a=428
inverted R=-
inverted r=-

25
ext/date/tests/DateInterval_format_a.phpt

@ -1,25 +0,0 @@
--TEST--
DateInterval::format(), %a
--CREDITS--
Daniel Convissor <danielc@php.net>
# TestFest 2010 BKTK
--INI--
date.timezone=UTC
--SKIPIF--
<?php
if (!method_exists('DateInterval', 'format')) die("skip: method doesn't exist");
if (substr(PHP_OS, 0, 3) != 'WIN') die("skip this test is for Windows platforms only");
?>
--FILE--
<?php
$date1 = new DateTime('2000-01-01 00:00:00');
$date2 = new DateTime('2001-03-04 04:05:06');
$interval = $date1->diff($date2);
echo $interval->format('a=%a') . "\n";
?>
--EXPECT--
a=428
Loading…
Cancel
Save