1--TEST--
2Test bad ISO date formats passed to DatePeriod constructor
3--FILE--
4<?php
5
6try {
7    new DatePeriod("R4");
8} catch (Exception $e) {
9    echo $e->getMessage(), "\n";
10}
11
12try {
13    new DatePeriod("R4/2012-07-01T00:00:00Z");
14} catch (Exception $e) {
15    echo $e->getMessage(), "\n";
16}
17
18
19try {
20    new DatePeriod("2012-07-01T00:00:00Z/P7D");
21} catch (Exception $e) {
22    echo $e->getMessage(), "\n";
23}
24
25?>
26--EXPECT--
27DatePeriod::__construct(): ISO interval must contain a start date, "R4" given
28DatePeriod::__construct(): ISO interval must contain an interval, "R4/2012-07-01T00:00:00Z" given
29DatePeriod::__construct(): ISO interval must contain an end date or a recurrence count, "2012-07-01T00:00:00Z/P7D" given
30