summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerick Rethans <github@derickrethans.nl>2012-12-17 16:49:25 +0000
committerDerick Rethans <github@derickrethans.nl>2013-01-12 15:16:25 +0000
commit0f679b926cb39f642ca051cb3ae6d7ab55db21fc (patch)
treef9a3d145ca5915001ddda1cdd247d29cc9484a9e
parent99e7d1dca2f7e6cd05a955a42c38792a694cc836 (diff)
downloadphp-git-0f679b926cb39f642ca051cb3ae6d7ab55db21fc.tar.gz
Added another test to test the unmodified inherited methods.
-rw-r--r--ext/date/tests/date_time_point-inherited.phpt25
1 files changed, 25 insertions, 0 deletions
diff --git a/ext/date/tests/date_time_point-inherited.phpt b/ext/date/tests/date_time_point-inherited.phpt
new file mode 100644
index 0000000000..e35540753c
--- /dev/null
+++ b/ext/date/tests/date_time_point-inherited.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Tests for DateTimePoint.
+--INI--
+date.timezone=Europe/London
+--FILE--
+<?php
+$tz = new DateTimeZone("Asia/Tokyo");
+$current = "2012-12-27 16:24:08";
+
+echo "\ngetTimezone():\n";
+$v = date_create_point($current);
+$x = $v->getTimezone();
+var_dump($x->getName());
+
+echo "\ngetTimestamp():\n";
+$v = date_create_point($current);
+$x = $v->getTimestamp();
+var_dump($x);
+?>
+--EXPECT--
+getTimezone():
+string(13) "Europe/London"
+
+getTimestamp():
+int(1356625448)