1--TEST--
2Test that calling DatePeriod::__unserialize() directly with missing arguments throws
3--FILE--
4<?php
5
6$start = new DateTime("2022-07-14 00:00:00", new DateTimeZone("UTC"));
7$interval = new DateInterval('P1D');
8$end = new DateTime("2022-07-16 00:00:00", new DateTimeZone("UTC"));
9$period = new DatePeriod($start, $interval, $end);
10
11try {
12    $period->__unserialize(
13        [
14            "start" => new DateTime,
15        ]
16    );
17} catch (\Error $e) {
18    echo $e::class, ': ', $e->getMessage(), "\n";
19}
20
21?>
22--EXPECT--
23Error: Invalid serialization data for DatePeriod object
24