1--TEST--
2DatePeriod: Test wrong recurrence parameter on __construct
3--FILE--
4<?php
5try {
6    new DatePeriod(new DateTime('yesterday'), new DateInterval('P1D'), 0);
7} catch (Exception $exception) {
8    echo $exception->getMessage(), "\n";
9}
10
11try {
12    new DatePeriod(new DateTime('yesterday'), new DateInterval('P1D'),-1);
13} catch (Exception $exception) {
14    echo $exception->getMessage(), "\n";
15}
16?>
17--EXPECTF--
18DatePeriod::__construct(): The recurrence count '0' is invalid. Needs to be > 0
19DatePeriod::__construct(): The recurrence count '-1' is invalid. Needs to be > 0
20