1--TEST--
2Test error condition of date_sunrise() and date_sunset()
3--FILE--
4<?php
5
6try {
7    date_sunrise(time(), 3);
8} catch (ValueError $exception) {
9    echo $exception->getMessage() . "\n";
10}
11
12try {
13    date_sunset(time(), 4);
14} catch (ValueError $exception) {
15    echo $exception->getMessage() . "\n";
16}
17
18?>
19--EXPECT--
20date_sunrise(): Argument #2 ($returnFormat) must be one of SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING, or SUNFUNCS_RET_DOUBLE
21date_sunset(): Argument #2 ($returnFormat) must be one of SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING, or SUNFUNCS_RET_DOUBLE
22