Skip to content

Commit 0f679b9

Browse files
committed
Added another test to test the unmodified inherited methods.
1 parent 99e7d1d commit 0f679b9

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Diff for: ext/date/tests/date_time_point-inherited.phpt

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
--TEST--
2+
Tests for DateTimePoint.
3+
--INI--
4+
date.timezone=Europe/London
5+
--FILE--
6+
<?php
7+
$tz = new DateTimeZone("Asia/Tokyo");
8+
$current = "2012-12-27 16:24:08";
9+
10+
echo "\ngetTimezone():\n";
11+
$v = date_create_point($current);
12+
$x = $v->getTimezone();
13+
var_dump($x->getName());
14+
15+
echo "\ngetTimestamp():\n";
16+
$v = date_create_point($current);
17+
$x = $v->getTimestamp();
18+
var_dump($x);
19+
?>
20+
--EXPECT--
21+
getTimezone():
22+
string(13) "Europe/London"
23+
24+
getTimestamp():
25+
int(1356625448)

0 commit comments

Comments
 (0)