@@ -423,7 +423,12 @@ public function testCalendarQuery($expectedEventsInResult, $propFilters, $compFi
423423 $ events [0 ] = $ this ->createEvent ($ calendarId , '20130912T130000Z ' , '20130912T140000Z ' );
424424 $ events [1 ] = $ this ->createEvent ($ calendarId , '20130912T150000Z ' , '20130912T170000Z ' );
425425 $ events [2 ] = $ this ->createEvent ($ calendarId , '20130912T173000Z ' , '20130912T220000Z ' );
426- $ events [3 ] = $ this ->createEvent ($ calendarId , '21130912T130000Z ' , '22130912T130000Z ' );
426+ if (PHP_INT_SIZE > 8 ) {
427+ $ events [3 ] = $ this ->createEvent ($ calendarId , '21130912T130000Z ' , '22130912T130000Z ' );
428+ } else {
429+ /* On 32bit we do not support events after 2038 */
430+ $ events [3 ] = $ this ->createEvent ($ calendarId , '20370912T130000Z ' , '20370912T130000Z ' );
431+ }
427432
428433 $ result = $ this ->backend ->calendarQuery ($ calendarId , [
429434 'name ' => '' ,
@@ -471,7 +476,7 @@ public function providesCalendarQueryParameters() {
471476 'only-events ' => [[0 , 1 , 2 , 3 ], [], [['name ' => 'VEVENT ' , 'is-not-defined ' => false , 'comp-filters ' => [], 'time-range ' => ['start ' => null , 'end ' => null ], 'prop-filters ' => []]],],
472477 'start ' => [[1 , 2 , 3 ], [], [['name ' => 'VEVENT ' , 'is-not-defined ' => false , 'comp-filters ' => [], 'time-range ' => ['start ' => new DateTime ('2013-09-12 14:00:00 ' , new DateTimeZone ('UTC ' )), 'end ' => null ], 'prop-filters ' => []]],],
473478 'end ' => [[0 ], [], [['name ' => 'VEVENT ' , 'is-not-defined ' => false , 'comp-filters ' => [], 'time-range ' => ['start ' => null , 'end ' => new DateTime ('2013-09-12 14:00:00 ' , new DateTimeZone ('UTC ' ))], 'prop-filters ' => []]],],
474- 'future ' => [[3 ], [], [['name ' => 'VEVENT ' , 'is-not-defined ' => false , 'comp-filters ' => [], 'time-range ' => ['start ' => new DateTime ('2099 -09-12 14:00:00 ' , new DateTimeZone ('UTC ' )), 'end ' => null ], 'prop-filters ' => []]],],
479+ 'future ' => [[3 ], [], [['name ' => 'VEVENT ' , 'is-not-defined ' => false , 'comp-filters ' => [], 'time-range ' => ['start ' => new DateTime ('2036 -09-12 14:00:00 ' , new DateTimeZone ('UTC ' )), 'end ' => null ], 'prop-filters ' => []]],],
475480 ];
476481 }
477482
@@ -648,8 +653,15 @@ public function testScheduling($objectData) {
648653 * @dataProvider providesCalDataForGetDenormalizedData
649654 */
650655 public function testGetDenormalizedData ($ expected , $ key , $ calData ) {
651- $ actual = $ this ->backend ->getDenormalizedData ($ calData );
652- $ this ->assertEquals ($ expected , $ actual [$ key ]);
656+ try {
657+ $ actual = $ this ->backend ->getDenormalizedData ($ calData );
658+ $ this ->assertEquals ($ expected , $ actual [$ key ]);
659+ } catch (\ValueError $ e ) {
660+ if (($ e ->getMessage () === 'Epoch doesn \'t fit in a PHP integer ' ) && (PHP_INT_SIZE < 8 )) {
661+ $ this ->markTestSkipped ('This fail on 32bits because of PHP limitations in DateTime ' );
662+ }
663+ throw $ e ;
664+ }
653665 }
654666
655667 public function providesCalDataForGetDenormalizedData () {
0 commit comments