xref: /php-src/ext/calendar/tests/gh16228.phpt (revision a3ff092c)
1--TEST--
2GH-16228 (easter_days, Overflow on year argument)
3--EXTENSIONS--
4calendar
5--FILE--
6<?php
7try {
8	easter_days(PHP_INT_MAX, 0);
9} catch (\ValueError $e) {
10	echo $e->getMessage() . PHP_EOL;
11}
12try {
13	easter_days(-1, 0);
14} catch (\ValueError $e) {
15	echo $e->getMessage() . PHP_EOL;
16}
17try {
18	easter_date(PHP_INT_MAX, 0);
19} catch (\ValueError $e) {
20	echo $e->getMessage() . PHP_EOL;
21}
22?>
23--EXPECTF--
24easter_days(): Argument #1 ($year) must be between 1 and %d
25easter_days(): Argument #1 ($year) must be between 1 and %d
26easter_date(): Argument #1 ($year) must be between 1 and %d
27