mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
d1764ca330
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
27 lines
477 B
PHP
27 lines
477 B
PHP
--TEST--
|
|
Test unixtojd() function : error conditions
|
|
--CREDITS--
|
|
edgarsandi - <edgar.r.sandi@gmail.com>
|
|
--SKIPIF--
|
|
<?php include 'skipif.inc'; ?>
|
|
--INI--
|
|
date.timezone=UTC
|
|
--FILE--
|
|
<?php
|
|
putenv('TZ=UTC');
|
|
|
|
try {
|
|
unixtojd(-1);
|
|
} catch (ValueError $ex) {
|
|
echo $ex->getMessage(), PHP_EOL;
|
|
}
|
|
var_dump(unixtojd(false)) . PHP_EOL;
|
|
var_dump(unixtojd(null)) . PHP_EOL;
|
|
var_dump(unixtojd(time())) . PHP_EOL;
|
|
?>
|
|
--EXPECTF--
|
|
Timestamp must not be negative
|
|
int(%d)
|
|
int(%d)
|
|
int(%d)
|