-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change version to 1.0.4 / Add some tests / Rewrite changelog
- Loading branch information
Showing
4 changed files
with
39 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--TEST-- | ||
Check for serialize/unserialize TimecopDateTime instance | ||
--SKIPIF-- | ||
<?php | ||
extension_loaded('timecop') or die('skip timecop not available'); | ||
if (version_compare(PHP_VERSION, '5.3.0') < 0) { | ||
die("skip requires PHP >= 5.3.0"); | ||
} | ||
$required_class = array("timecopdatetime"); | ||
foreach ($required_class as $class_name) { | ||
if (!class_exists($class_name)) { | ||
die("skip $class_name class is not available."); | ||
} | ||
} | ||
--INI-- | ||
date.timezone=America/Los_Angeles | ||
timecop.func_override=0 | ||
--FILE-- | ||
<?php | ||
$dt1 = new TimecopDateTime("2012-01-01 12:00:00 GMT"); | ||
$dt2 = unserialize(serialize($dt1)); | ||
var_dump($dt2->format("c")); | ||
--EXPECT-- | ||
string(25) "2012-01-01T12:00:00+00:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters