You are here

public function DateTest::testDateTimeExcelToPHP1904 in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/unitTests/Classes/PHPExcel/Shared/DateTest.php \DateTest::testDateTimeExcelToPHP1904()

@dataProvider providerDateTimeExcelToPHP1904

File

vendor/phpoffice/phpexcel/unitTests/Classes/PHPExcel/Shared/DateTest.php, line 106

Class

DateTest

Code

public function testDateTimeExcelToPHP1904() {
  $result = call_user_func(array(
    'PHPExcel_Shared_Date',
    'setExcelCalendar',
  ), PHPExcel_Shared_Date::CALENDAR_MAC_1904);
  $args = func_get_args();
  $expectedResult = array_pop($args);
  if ($args[0] < 1) {
    $expectedResult += gmmktime(0, 0, 0);
  }
  $result = call_user_func_array(array(
    'PHPExcel_Shared_Date',
    'ExcelToPHP',
  ), $args);
  $this
    ->assertEquals($expectedResult, $result);
}