]> granicus.if.org Git - php/commitdiff
Added another test to test the unmodified inherited methods.
authorDerick Rethans <github@derickrethans.nl>
Mon, 17 Dec 2012 16:49:25 +0000 (16:49 +0000)
committerDerick Rethans <github@derickrethans.nl>
Mon, 14 Jan 2013 20:34:58 +0000 (20:34 +0000)
ext/date/tests/date_time_point-inherited.phpt [new file with mode: 0644]

diff --git a/ext/date/tests/date_time_point-inherited.phpt b/ext/date/tests/date_time_point-inherited.phpt
new file mode 100644 (file)
index 0000000..e355407
--- /dev/null
@@ -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)