ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
DateTest Class Reference
+ Inheritance diagram for DateTest:
+ Collaboration diagram for DateTest:

Public Member Functions

 setUp ()
 
 testSetExcelCalendar ()
 
 testSetExcelCalendarWithInvalidValue ()
 
 testDateTimeExcelToPHP1900 ()
 providerDateTimeExcelToPHP1900 More...
 
 providerDateTimeExcelToPHP1900 ()
 
 testDateTimePHPToExcel1900 ()
 providerDateTimePHPToExcel1900 More...
 
 providerDateTimePHPToExcel1900 ()
 
 testDateTimeFormattedPHPToExcel1900 ()
 providerDateTimeFormattedPHPToExcel1900 More...
 
 providerDateTimeFormattedPHPToExcel1900 ()
 
 testDateTimeExcelToPHP1904 ()
 providerDateTimeExcelToPHP1904 More...
 
 providerDateTimeExcelToPHP1904 ()
 
 testDateTimePHPToExcel1904 ()
 providerDateTimePHPToExcel1904 More...
 
 providerDateTimePHPToExcel1904 ()
 
 testIsDateTimeFormatCode ()
 providerIsDateTimeFormatCode More...
 
 providerIsDateTimeFormatCode ()
 
 testDateTimeExcelToPHP1900Timezone ()
 providerDateTimeExcelToPHP1900Timezone More...
 
 providerDateTimeExcelToPHP1900Timezone ()
 

Detailed Description

Definition at line 6 of file DateTest.php.

Member Function Documentation

◆ providerDateTimeExcelToPHP1900()

DateTest::providerDateTimeExcelToPHP1900 ( )

Definition at line 56 of file DateTest.php.

57  {
58  return new testDataFileIterator('rawTestData/Shared/DateTimeExcelToPHP1900.data');
59  }

◆ providerDateTimeExcelToPHP1900Timezone()

DateTest::providerDateTimeExcelToPHP1900Timezone ( )

Definition at line 183 of file DateTest.php.

184  {
185  return new testDataFileIterator('rawTestData/Shared/DateTimeExcelToPHP1900Timezone.data');
186  }

◆ providerDateTimeExcelToPHP1904()

DateTest::providerDateTimeExcelToPHP1904 ( )

Definition at line 122 of file DateTest.php.

123  {
124  return new testDataFileIterator('rawTestData/Shared/DateTimeExcelToPHP1904.data');
125  }

◆ providerDateTimeFormattedPHPToExcel1900()

DateTest::providerDateTimeFormattedPHPToExcel1900 ( )

Definition at line 98 of file DateTest.php.

99  {
100  return new testDataFileIterator('rawTestData/Shared/DateTimeFormattedPHPToExcel1900.data');
101  }

◆ providerDateTimePHPToExcel1900()

DateTest::providerDateTimePHPToExcel1900 ( )

Definition at line 77 of file DateTest.php.

78  {
79  return new testDataFileIterator('rawTestData/Shared/DateTimePHPToExcel1900.data');
80  }

◆ providerDateTimePHPToExcel1904()

DateTest::providerDateTimePHPToExcel1904 ( )

Definition at line 143 of file DateTest.php.

144  {
145  return new testDataFileIterator('rawTestData/Shared/DateTimePHPToExcel1904.data');
146  }

◆ providerIsDateTimeFormatCode()

DateTest::providerIsDateTimeFormatCode ( )

Definition at line 159 of file DateTest.php.

160  {
161  return new testDataFileIterator('rawTestData/Shared/DateTimeFormatCodes.data');
162  }

◆ setUp()

DateTest::setUp ( )

Definition at line 9 of file DateTest.php.

References defined.

10  {
11  if (!defined('PHPEXCEL_ROOT')) {
12  define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
13  }
14  require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
15  }
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27

◆ testDateTimeExcelToPHP1900()

DateTest::testDateTimeExcelToPHP1900 ( )

providerDateTimeExcelToPHP1900

Definition at line 40 of file DateTest.php.

References $result, array, and PHPExcel_Shared_Date\CALENDAR_WINDOWS_1900.

41  {
42  $result = call_user_func(
43  array('PHPExcel_Shared_Date','setExcelCalendar'),
45  );
46 
47  $args = func_get_args();
48  $expectedResult = array_pop($args);
49  if ($args[0] < 1) {
50  $expectedResult += gmmktime(0,0,0);
51  }
52  $result = call_user_func_array(array('PHPExcel_Shared_Date','ExcelToPHP'),$args);
53  $this->assertEquals($expectedResult, $result);
54  }
$result
Create styles array
The data for the language used.
const CALENDAR_WINDOWS_1900
constants
Definition: Date.php:40

◆ testDateTimeExcelToPHP1900Timezone()

DateTest::testDateTimeExcelToPHP1900Timezone ( )

providerDateTimeExcelToPHP1900Timezone

Definition at line 167 of file DateTest.php.

References $result, array, and PHPExcel_Shared_Date\CALENDAR_WINDOWS_1900.

168  {
169  $result = call_user_func(
170  array('PHPExcel_Shared_Date','setExcelCalendar'),
172  );
173 
174  $args = func_get_args();
175  $expectedResult = array_pop($args);
176  if ($args[0] < 1) {
177  $expectedResult += gmmktime(0,0,0);
178  }
179  $result = call_user_func_array(array('PHPExcel_Shared_Date','ExcelToPHP'),$args);
180  $this->assertEquals($expectedResult, $result);
181  }
$result
Create styles array
The data for the language used.
const CALENDAR_WINDOWS_1900
constants
Definition: Date.php:40

◆ testDateTimeExcelToPHP1904()

DateTest::testDateTimeExcelToPHP1904 ( )

providerDateTimeExcelToPHP1904

Definition at line 106 of file DateTest.php.

References $result, array, and PHPExcel_Shared_Date\CALENDAR_MAC_1904.

107  {
108  $result = call_user_func(
109  array('PHPExcel_Shared_Date','setExcelCalendar'),
111  );
112 
113  $args = func_get_args();
114  $expectedResult = array_pop($args);
115  if ($args[0] < 1) {
116  $expectedResult += gmmktime(0,0,0);
117  }
118  $result = call_user_func_array(array('PHPExcel_Shared_Date','ExcelToPHP'),$args);
119  $this->assertEquals($expectedResult, $result);
120  }
$result
const CALENDAR_MAC_1904
Definition: Date.php:41
Create styles array
The data for the language used.

◆ testDateTimeFormattedPHPToExcel1900()

DateTest::testDateTimeFormattedPHPToExcel1900 ( )

providerDateTimeFormattedPHPToExcel1900

Definition at line 85 of file DateTest.php.

References $result, array, and PHPExcel_Shared_Date\CALENDAR_WINDOWS_1900.

86  {
87  $result = call_user_func(
88  array('PHPExcel_Shared_Date','setExcelCalendar'),
90  );
91 
92  $args = func_get_args();
93  $expectedResult = array_pop($args);
94  $result = call_user_func_array(array('PHPExcel_Shared_Date','FormattedPHPToExcel'),$args);
95  $this->assertEquals($expectedResult, $result, NULL, 1E-5);
96  }
$result
Create styles array
The data for the language used.
const CALENDAR_WINDOWS_1900
constants
Definition: Date.php:40

◆ testDateTimePHPToExcel1900()

DateTest::testDateTimePHPToExcel1900 ( )

providerDateTimePHPToExcel1900

Definition at line 64 of file DateTest.php.

References $result, array, and PHPExcel_Shared_Date\CALENDAR_WINDOWS_1900.

65  {
66  $result = call_user_func(
67  array('PHPExcel_Shared_Date','setExcelCalendar'),
69  );
70 
71  $args = func_get_args();
72  $expectedResult = array_pop($args);
73  $result = call_user_func_array(array('PHPExcel_Shared_Date','PHPToExcel'),$args);
74  $this->assertEquals($expectedResult, $result, NULL, 1E-5);
75  }
$result
Create styles array
The data for the language used.
const CALENDAR_WINDOWS_1900
constants
Definition: Date.php:40

◆ testDateTimePHPToExcel1904()

DateTest::testDateTimePHPToExcel1904 ( )

providerDateTimePHPToExcel1904

Definition at line 130 of file DateTest.php.

References $result, array, and PHPExcel_Shared_Date\CALENDAR_MAC_1904.

131  {
132  $result = call_user_func(
133  array('PHPExcel_Shared_Date','setExcelCalendar'),
135  );
136 
137  $args = func_get_args();
138  $expectedResult = array_pop($args);
139  $result = call_user_func_array(array('PHPExcel_Shared_Date','PHPToExcel'),$args);
140  $this->assertEquals($expectedResult, $result, NULL, 1E-5);
141  }
$result
const CALENDAR_MAC_1904
Definition: Date.php:41
Create styles array
The data for the language used.

◆ testIsDateTimeFormatCode()

DateTest::testIsDateTimeFormatCode ( )

providerIsDateTimeFormatCode

Definition at line 151 of file DateTest.php.

References $result, and array.

152  {
153  $args = func_get_args();
154  $expectedResult = array_pop($args);
155  $result = call_user_func_array(array('PHPExcel_Shared_Date','isDateTimeFormatCode'),$args);
156  $this->assertEquals($expectedResult, $result);
157  }
$result
Create styles array
The data for the language used.

◆ testSetExcelCalendar()

DateTest::testSetExcelCalendar ( )

Definition at line 17 of file DateTest.php.

References $result, array, PHPExcel_Shared_Date\CALENDAR_MAC_1904, and PHPExcel_Shared_Date\CALENDAR_WINDOWS_1900.

18  {
19  $calendarValues = array(
22  );
23 
24  foreach($calendarValues as $calendarValue) {
25  $result = call_user_func(array('PHPExcel_Shared_Date','setExcelCalendar'),$calendarValue);
26  $this->assertTrue($result);
27  }
28  }
$result
const CALENDAR_MAC_1904
Definition: Date.php:41
Create styles array
The data for the language used.
const CALENDAR_WINDOWS_1900
constants
Definition: Date.php:40

◆ testSetExcelCalendarWithInvalidValue()

DateTest::testSetExcelCalendarWithInvalidValue ( )

Definition at line 30 of file DateTest.php.

References $result, and array.

31  {
32  $unsupportedCalendar = '2012';
33  $result = call_user_func(array('PHPExcel_Shared_Date','setExcelCalendar'),$unsupportedCalendar);
34  $this->assertFalse($result);
35  }
$result
Create styles array
The data for the language used.

The documentation for this class was generated from the following file: