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?> 18--EXPECTF-- 19DatePeriod::__construct(): Recurrence count must be greater or equal to 1 and lower than %d 20DatePeriod::__construct(): Recurrence count must be greater or equal to 1 and lower than %d 21