summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Carlo Machado <contato@jeancarlomachado.com.br>2016-10-27 17:05:47 -0200
committerJoe Watkins <krakjoe@php.net>2016-11-12 09:57:50 +0000
commitf578ce3a13f8ea6147e8ff92cde4470a522fd619 (patch)
treecb4d1aa905eeb5c17745d5048da96f5999e9eb87
parentff1986e4d7be8aaf0c63cf3ac64e67464a209653 (diff)
downloadphp-git-f578ce3a13f8ea6147e8ff92cde4470a522fd619.tar.gz
added a test for date_interval_format function
-rw-r--r--ext/date/tests/date_interval_format.phpt21
1 files changed, 21 insertions, 0 deletions
diff --git a/ext/date/tests/date_interval_format.phpt b/ext/date/tests/date_interval_format.phpt
new file mode 100644
index 0000000000..768fe46b6a
--- /dev/null
+++ b/ext/date/tests/date_interval_format.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Test date_interval_format() function : basic functionality
+--CREDITS--
+Jean Carlo Machado <contato@jeancarlomachado.com.br>
+--INI--
+date.timezone=UTC
+--FILE--
+<?php
+
+$interval = new DateInterval('P2Y4DT6H8M');
+echo date_interval_format($interval, '%d days');
+
+echo PHP_EOL;
+
+$interval = new DateInterval('P32D');
+echo date_interval_format($interval, '%d days');
+
+?>
+--EXPECTF--
+4 days
+32 days