php-src/ext/calendar/tests/unixtojd_error1.phpt
Máté Kocsis d1764ca330
Make error messages more consistent by fixing capitalization
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
2020-01-17 14:52:46 +01:00

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)