com php-src: Added another test to test the unmodified inherited methods.: ext/date/tests/date_time_point-inherited.phpt
| From: | Derick Rethans | Date: | Sat, 12 Jan 2013 15:16:25 +0000 |
| Subject: | com php-src: Added another test to test the unmodified inherited methods.: ext/date/tests/date_time_point-inherited.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-70924@lists.php.net to get a copy of this message | ||
Commit: 0f679b926cb39f642ca051cb3ae6d7ab55db21fc
Author: Derick Rethans <github@derickrethans.nl> Mon, 17 Dec 2012 16:49:25 +0000
Parents: 99e7d1dca2f7e6cd05a955a42c38792a694cc836
Branches: immutable-date
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0f679b926cb39f642ca051cb3ae6d7ab55db21fc
Log:
Added another test to test the unmodified inherited methods.
Changed paths:
A ext/date/tests/date_time_point-inherited.phpt
Diff:
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 0000000..e355407
--- /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)