1--TEST--
2Test cal_days_in_month() function : error conditions
3--CREDITS--
4edgarsandi - <edgar.r.sandi@gmail.com>
5--EXTENSIONS--
6calendar
7--FILE--
8<?php
9try {
10    cal_days_in_month(-1, 4, 2017);
11} catch (ValueError $ex) {
12    echo "{$ex->getMessage()}\n";
13}
14try{
15    cal_days_in_month(CAL_GREGORIAN,0, 2009);
16} catch (ValueError $ex) {
17    echo "{$ex->getMessage()}\n";
18}
19?>
20--EXPECT--
21cal_days_in_month(): Argument #1 ($calendar) must be a valid calendar ID
22Invalid date
23