/php-src/ext/date/tests/ |
H A D | date_period_bad_iso_format.phpt | 2 Test bad ISO date formats passed to DatePeriod constructor 7 new DatePeriod("R4"); 13 DatePeriod::createFromISO8601String("R4"); 19 new DatePeriod("R4/2012-07-01T00:00:00Z"); 25 DatePeriod::createFromISO8601String("R4/2012-07-01T00:00:00Z"); 31 new DatePeriod("2012-07-01T00:00:00Z/P7D"); 37 DatePeriod::createFromISO8601String("2012-07-01T00:00:00Z/P7D"); 44 Deprecated: Calling DatePeriod::__construct(string $isostr, int $options = 0) is deprecated, use Da… 48 Deprecated: Calling DatePeriod::__construct(string $isostr, int $options = 0) is deprecated, use Da… 52 Deprecated: Calling DatePeriod::__construct(string $isostr, int $options = 0) is deprecated, use Da… [all …]
|
H A D | DatePeriod_wrong_arguments.phpt | 2 DatePeriod arguments/wrong arguments 5 $dp = new DatePeriod(new \DateTimeImmutable("2023-01-13 12:29:30"), DateInterval::createFromDateStr… 6 echo get_class($dp) == 'DatePeriod' ? "OK\n" : "FAIL\n"; 8 $dp = new DatePeriod(new \DateTimeImmutable("2023-01-13 12:29:30"), DateInterval::createFromDateStr… 9 echo get_class($dp) == 'DatePeriod' ? "OK\n" : "FAIL\n"; 11 $dp = new DatePeriod("R4/2012-07-01T00:00:00Z/P7D"); 12 echo get_class($dp) == 'DatePeriod' ? "OK\n" : "FAIL\n"; 14 $dp = DatePeriod::createFromISO8601String("R4/2012-07-01T00:00:00Z/P7D"); 15 echo get_class($dp) == 'DatePeriod' ? "OK\n" : "FAIL\n"; 18 $dp = new DatePeriod("2023-01-13 17:24:58", DateInterval::createFromDateString("tomorrow"), 4); [all …]
|
H A D | DatePeriod_properties2.phpt | 2 DatePeriod: Test cannot modify read only properties 41 Error: Cannot modify readonly property DatePeriod::$recurrences 42 Error: Cannot modify readonly property DatePeriod::$recurrences 45 Error: Cannot modify readonly property DatePeriod::$start 46 Error: Cannot modify readonly property DatePeriod::$start 47 Error: Cannot modify readonly property DatePeriod::$current 48 Error: Cannot modify readonly property DatePeriod::$current 49 Error: Cannot modify readonly property DatePeriod::$end 50 Error: Cannot modify readonly property DatePeriod::$end 51 Error: Cannot modify readonly property DatePeriod::$interval [all …]
|
H A D | bug78055.phpt | 2 Bug #78055 (DatePeriod's getRecurrences and ->recurrences don't match) 10 $period = new DatePeriod($start, $interval, $recurrences, DatePeriod::EXCLUDE_START_DATE); 13 $period = new DatePeriod($start, $interval, $recurrences); 16 $period = new DatePeriod($start, $interval, $recurrences, DatePeriod::INCLUDE_END_DATE); 19 $period = new DatePeriod($start, $interval, $end); 22 $period = new DatePeriod($start, $interval, $end, DatePeriod::EXCLUDE_START_DATE);
|
H A D | date_period_exclude_start_and_include_end.phpt | 2 DatePeriod::EXCLUDE_START_DATE|DatePeriod::INCLUDE_END_DATE 10 $dp = new DatePeriod($start, $interval, $end, DatePeriod::EXCLUDE_START_DATE | DatePeriod::INCLUDE_…
|
H A D | DatePeriod_wrong_recurrence_on_constructor.phpt | 2 DatePeriod: Test wrong recurrence parameter on __construct 6 new DatePeriod(new DateTime('yesterday'), new DateInterval('P1D'), 0); 12 new DatePeriod(new DateTime('yesterday'), new DateInterval('P1D'), -1); 19 DatePeriod::__construct(): Recurrence count must be greater than 0 20 DatePeriod::__construct(): Recurrence count must be greater than 0
|
H A D | date_interval_bad_format_leak.phpt | 13 new DatePeriod('P3"D'); 19 DatePeriod::createFromISO8601String('P3"D'); 25 new DatePeriod('2008-03-01T12:00:00Z1'); 31 DatePeriod::createFromISO8601String('2008-03-01T12:00:00Z1'); 40 Deprecated: Calling DatePeriod::__construct(string $isostr, int $options = 0) is deprecated, use Da… 44 Deprecated: Calling DatePeriod::__construct(string $isostr, int $options = 0) is deprecated, use Da…
|
H A D | bug54283.phpt | 2 Bug #54283 (new DatePeriod(NULL) causes crash) 7 var_dump(new DatePeriod(NULL)); 14 Deprecated: DatePeriod::__construct(): Passing null to parameter #1 ($start) of type string is depr… 16 Deprecated: Calling DatePeriod::__construct(string $isostr, int $options = 0) is deprecated, use Da…
|
H A D | DatePeriod_IteratorAggregate.phpt | 2 DatePeriod can be used as an IteratorAggregate 6 $period = new DatePeriod('R2/2012-07-01T00:00:00Z/P7D'); 38 class MyDatePeriod1 extends DatePeriod { 48 class MyDatePeriod2 extends DatePeriod { 62 Deprecated: Calling DatePeriod::__construct(string $isostr, int $options = 0) is deprecated, use Da… 84 Deprecated: Calling DatePeriod::__construct(string $isostr, int $options = 0) is deprecated, use Da… 90 Deprecated: Calling DatePeriod::__construct(string $isostr, int $options = 0) is deprecated, use Da…
|
H A D | bug-gh11416.phpt | 2 Bug GH-11416: Crash with DatePeriod when uninitialised objects are passed in 12 new DatePeriod($date, new DateInterval('P1D'), 2); 19 new DatePeriod($now, new DateInterval('P1D'), $date); 25 $dateperiod = (new ReflectionClass(DatePeriod::class))->newInstanceWithoutConstructor(); 56 echo "DatePeriod::__unserialize: SUCCESS\n"; 65 Error: Invalid serialization data for DatePeriod object 66 Error: Invalid serialization data for DatePeriod object 67 Error: Invalid serialization data for DatePeriod object 68 Error: Invalid serialization data for DatePeriod object 69 DatePeriod::__unserialize: SUCCESS
|
H A D | bug44562.phpt | 2 Bug #44562 (Creating instance of DatePeriod crashes) 8 $dp = new DatePeriod('2D'); 14 DatePeriod::createFromISO8601String('2D'); 22 $dp = new DatePeriod( $begin, $interval, 10 ); 30 Deprecated: Calling DatePeriod::__construct(string $isostr, int $options = 0) is deprecated, use Da…
|
H A D | DatePeriod_set_state_exception.phpt | 2 DatePeriod invalid serialization data 49 $d = DatePeriod::__set_state( $propertySet ); 59 Error: Invalid serialization data for DatePeriod object 60 Error: Invalid serialization data for DatePeriod object 61 Error: Invalid serialization data for DatePeriod object 62 Error: Invalid serialization data for DatePeriod object 63 Error: Invalid serialization data for DatePeriod object 64 Error: Invalid serialization data for DatePeriod object 65 Error: Invalid serialization data for DatePeriod object
|
H A D | bug53437_var1.phpt | 2 Bug #53437 (Crash when using unserialized DatePeriod instance), variation 2 5 $s = 'O:10:"DatePeriod":0:{}'; 13 Fatal error: Uncaught Error: Invalid serialization data for DatePeriod object in %sbug53437_var1.ph… 15 #0 [internal function]: DatePeriod->__unserialize(Array)
|
H A D | DatePeriod_modify_readonly_property.phpt | 2 DatePeriod modify readonly property 5 $dp = new \DatePeriod( 24 Error: Cannot modify readonly property DatePeriod::$interval 25 Error: Cannot modify readonly property DatePeriod::$interval
|
H A D | DatePeriod_getter.phpt | 2 DatePeriod: Test getter 10 $period = new DatePeriod($start, $interval, $end); 22 $periodWithRecurrences = new DatePeriod($start, $interval, $recurrences); 27 $periodWithRecurrencesWithoutStart = new DatePeriod($start, $interval, $recurrences, DatePeriod::EX…
|
H A D | date_period_microseconds.phpt | 2 DatePeriod: take microseconds into account 11 foreach (new DatePeriod($start, $interval, $end) as $day) { 16 foreach (new DatePeriod($start, $interval, $end, DatePeriod::INCLUDE_END_DATE) as $day) { 22 foreach (new DatePeriod($start, $interval, $end) as $day) { 28 foreach (new DatePeriod($start, $interval, $end, DatePeriod::INCLUDE_END_DATE) as $day) {
|
H A D | date_period_include_end.phpt | 2 DatePeriod::INCLUDE_END_DATE 10 foreach (new DatePeriod($start, $interval, $end, DatePeriod::INCLUDE_END_DATE) as $day) {
|
H A D | date_period_set_state2.phpt | 2 Test that calling DatePeriod::__set_state() directly with missing arguments throws 7 DatePeriod::__set_state( 18 Error: Invalid serialization data for DatePeriod object
|
H A D | DatePeriod_wrong_constructor.phpt | 2 DatePeriod: Test wrong __construct parameter 12 new DatePeriod(); 18 DatePeriod::__construct() accepts (DateTimeInterface, DateInterval, int [, int]), or (DateTimeInter…
|
H A D | DatePeriod_uninitialised_exceptions.phpt | 7 class MyDatePeriod extends DatePeriod 40 DateObjectError: Object of type MyDatePeriod (inheriting DatePeriod) has not been correctly initial… 41 DateObjectError: Object of type MyDatePeriod (inheriting DatePeriod) has not been correctly initial… 42 DateObjectError: Object of type MyDatePeriod (inheriting DatePeriod) has not been correctly initial… 43 DateObjectError: Object of type DatePeriod has not been correctly initialized by calling parent::__…
|
H A D | bug65672.phpt | 2 Test for bug #65672: Broken classes inherited from DatePeriod 9 $period = new class(new DateTime, $interval, new DateTime) extends DatePeriod { 44 Deprecated: Creation of dynamic property DatePeriod@anonymous::$dynamic1 is deprecated in %s on lin… 47 Deprecated: Creation of dynamic property DatePeriod@anonymous::$dynamic2 is deprecated in %s on lin… 53 Deprecated: Creation of dynamic property DatePeriod@anonymous::$dynamic3 is deprecated in %s on lin…
|
H A D | date_period.phpt | 2 DatePeriod 10 foreach ( new DatePeriod( $db, $di, $de ) as $dt ) 21 foreach ( new DatePeriod( $db, $di, $de, DatePeriod::EXCLUDE_START_DATE ) as $dt )
|
H A D | date_period_unserialize2.phpt | 2 Test that calling DatePeriod::__unserialize() directly with missing arguments throws 9 $period = new DatePeriod($start, $interval, $end); 23 Error: Invalid serialization data for DatePeriod object
|
H A D | bug53437_var0.phpt | 2 Bug #53437 (Crash when using unserialized DatePeriod instance), variation 0 5 $dp = new DatePeriod(new DateTime('2010-01-01 UTC'), new DateInterval('P1D'), 2); 14 $ser = serialize($dp); // $ser is: O:10:"DatePeriod":0:{} 31 object(DatePeriod)#%d (%d) { 82 object(DatePeriod)#%d (%d) {
|
H A D | date_period_unserialize3.phpt | 2 Test that calling DatePeriod::__unserialize() directly with wrong argument type throws 9 $period = new DatePeriod($start, $interval, $end); 31 Error: Invalid serialization data for DatePeriod object 32 object(DatePeriod)#%d (%d) {
|