@@ -25,7 +25,7 @@ public function setUp()
25
25
public function testDATE ($ expectedResult , ...$ args )
26
26
{
27
27
$ result = DateTime::DATE (...$ args );
28
- $ this -> assertEquals ($ expectedResult , $ result , null , 1E-8 );
28
+ self :: assertEquals ($ expectedResult , $ result , null , 1E-8 );
29
29
}
30
30
31
31
public function providerDATE ()
@@ -38,7 +38,7 @@ public function testDATEtoPHP()
38
38
Functions::setReturnDateType (Functions::RETURNDATE_PHP_NUMERIC );
39
39
$ result = DateTime::DATE (2012 , 1 , 31 );
40
40
Functions::setReturnDateType (Functions::RETURNDATE_EXCEL );
41
- $ this -> assertEquals (1327968000 , $ result , null , 1E-8 );
41
+ self :: assertEquals (1327968000 , $ result , null , 1E-8 );
42
42
}
43
43
44
44
public function testDATEtoPHPObject ()
@@ -47,27 +47,27 @@ public function testDATEtoPHPObject()
47
47
$ result = DateTime::DATE (2012 , 1 , 31 );
48
48
Functions::setReturnDateType (Functions::RETURNDATE_EXCEL );
49
49
// Must return an object...
50
- $ this -> assertInternalType ('object ' , $ result );
50
+ self :: assertInternalType ('object ' , $ result );
51
51
// ... of the correct type
52
- $ this -> assertTrue (is_a ($ result , 'DateTime ' ));
52
+ self :: assertTrue (is_a ($ result , 'DateTime ' ));
53
53
// ... with the correct value
54
- $ this -> assertEquals ($ result ->format ('d-M-Y ' ), '31-Jan-2012 ' );
54
+ self :: assertEquals ($ result ->format ('d-M-Y ' ), '31-Jan-2012 ' );
55
55
}
56
56
57
57
public function testDATEwith1904Calendar ()
58
58
{
59
59
Date::setExcelCalendar (Date::CALENDAR_MAC_1904 );
60
60
$ result = DateTime::DATE (1918 , 11 , 11 );
61
61
Date::setExcelCalendar (Date::CALENDAR_WINDOWS_1900 );
62
- $ this -> assertEquals ($ result , 5428 );
62
+ self :: assertEquals ($ result , 5428 );
63
63
}
64
64
65
65
public function testDATEwith1904CalendarError ()
66
66
{
67
67
Date::setExcelCalendar (Date::CALENDAR_MAC_1904 );
68
68
$ result = DateTime::DATE (1901 , 1 , 31 );
69
69
Date::setExcelCalendar (Date::CALENDAR_WINDOWS_1900 );
70
- $ this -> assertEquals ($ result , '#NUM! ' );
70
+ self :: assertEquals ($ result , '#NUM! ' );
71
71
}
72
72
73
73
/**
@@ -78,7 +78,7 @@ public function testDATEwith1904CalendarError()
78
78
public function testDATEVALUE ($ expectedResult , ...$ args )
79
79
{
80
80
$ result = DateTime::DATEVALUE (...$ args );
81
- $ this -> assertEquals ($ expectedResult , $ result , null , 1E-8 );
81
+ self :: assertEquals ($ expectedResult , $ result , null , 1E-8 );
82
82
}
83
83
84
84
public function providerDATEVALUE ()
@@ -91,7 +91,7 @@ public function testDATEVALUEtoPHP()
91
91
Functions::setReturnDateType (Functions::RETURNDATE_PHP_NUMERIC );
92
92
$ result = DateTime::DATEVALUE ('2012-1-31 ' );
93
93
Functions::setReturnDateType (Functions::RETURNDATE_EXCEL );
94
- $ this -> assertEquals (1327968000 , $ result , null , 1E-8 );
94
+ self :: assertEquals (1327968000 , $ result , null , 1E-8 );
95
95
}
96
96
97
97
public function testDATEVALUEtoPHPObject ()
@@ -100,11 +100,11 @@ public function testDATEVALUEtoPHPObject()
100
100
$ result = DateTime::DATEVALUE ('2012-1-31 ' );
101
101
Functions::setReturnDateType (Functions::RETURNDATE_EXCEL );
102
102
// Must return an object...
103
- $ this -> assertInternalType ('object ' , $ result );
103
+ self :: assertInternalType ('object ' , $ result );
104
104
// ... of the correct type
105
- $ this -> assertTrue (is_a ($ result , 'DateTime ' ));
105
+ self :: assertTrue (is_a ($ result , 'DateTime ' ));
106
106
// ... with the correct value
107
- $ this -> assertEquals ($ result ->format ('d-M-Y ' ), '31-Jan-2012 ' );
107
+ self :: assertEquals ($ result ->format ('d-M-Y ' ), '31-Jan-2012 ' );
108
108
}
109
109
110
110
/**
@@ -115,7 +115,7 @@ public function testDATEVALUEtoPHPObject()
115
115
public function testYEAR ($ expectedResult , ...$ args )
116
116
{
117
117
$ result = DateTime::YEAR (...$ args );
118
- $ this -> assertEquals ($ expectedResult , $ result , null , 1E-8 );
118
+ self :: assertEquals ($ expectedResult , $ result , null , 1E-8 );
119
119
}
120
120
121
121
public function providerYEAR ()
@@ -131,7 +131,7 @@ public function providerYEAR()
131
131
public function testMONTH ($ expectedResult , ...$ args )
132
132
{
133
133
$ result = DateTime::MONTHOFYEAR (...$ args );
134
- $ this -> assertEquals ($ expectedResult , $ result , null , 1E-8 );
134
+ self :: assertEquals ($ expectedResult , $ result , null , 1E-8 );
135
135
}
136
136
137
137
public function providerMONTH ()
@@ -147,7 +147,7 @@ public function providerMONTH()
147
147
public function testWEEKNUM ($ expectedResult , ...$ args )
148
148
{
149
149
$ result = DateTime::WEEKNUM (...$ args );
150
- $ this -> assertEquals ($ expectedResult , $ result , null , 1E-8 );
150
+ self :: assertEquals ($ expectedResult , $ result , null , 1E-8 );
151
151
}
152
152
153
153
public function providerWEEKNUM ()
@@ -163,7 +163,7 @@ public function providerWEEKNUM()
163
163
public function testWEEKDAY ($ expectedResult , ...$ args )
164
164
{
165
165
$ result = DateTime::WEEKDAY (...$ args );
166
- $ this -> assertEquals ($ expectedResult , $ result , null , 1E-8 );
166
+ self :: assertEquals ($ expectedResult , $ result , null , 1E-8 );
167
167
}
168
168
169
169
public function providerWEEKDAY ()
@@ -179,7 +179,7 @@ public function providerWEEKDAY()
179
179
public function testDAY ($ expectedResult , ...$ args )
180
180
{
181
181
$ result = DateTime::DAYOFMONTH (...$ args );
182
- $ this -> assertEquals ($ expectedResult , $ result , null , 1E-8 );
182
+ self :: assertEquals ($ expectedResult , $ result , null , 1E-8 );
183
183
}
184
184
185
185
public function providerDAY ()
@@ -195,7 +195,7 @@ public function providerDAY()
195
195
public function testTIME ($ expectedResult , ...$ args )
196
196
{
197
197
$ result = DateTime::TIME (...$ args );
198
- $ this -> assertEquals ($ expectedResult , $ result , null , 1E-8 );
198
+ self :: assertEquals ($ expectedResult , $ result , null , 1E-8 );
199
199
}
200
200
201
201
public function providerTIME ()
@@ -208,7 +208,7 @@ public function testTIMEtoPHP()
208
208
Functions::setReturnDateType (Functions::RETURNDATE_PHP_NUMERIC );
209
209
$ result = DateTime::TIME (7 , 30 , 20 );
210
210
Functions::setReturnDateType (Functions::RETURNDATE_EXCEL );
211
- $ this -> assertEquals (27020 , $ result , null , 1E-8 );
211
+ self :: assertEquals (27020 , $ result , null , 1E-8 );
212
212
}
213
213
214
214
public function testTIMEtoPHPObject ()
@@ -217,11 +217,11 @@ public function testTIMEtoPHPObject()
217
217
$ result = DateTime::TIME (7 , 30 , 20 );
218
218
Functions::setReturnDateType (Functions::RETURNDATE_EXCEL );
219
219
// Must return an object...
220
- $ this -> assertInternalType ('object ' , $ result );
220
+ self :: assertInternalType ('object ' , $ result );
221
221
// ... of the correct type
222
- $ this -> assertTrue (is_a ($ result , 'DateTime ' ));
222
+ self :: assertTrue (is_a ($ result , 'DateTime ' ));
223
223
// ... with the correct value
224
- $ this -> assertEquals ($ result ->format ('H:i:s ' ), '07:30:20 ' );
224
+ self :: assertEquals ($ result ->format ('H:i:s ' ), '07:30:20 ' );
225
225
}
226
226
227
227
/**
@@ -232,7 +232,7 @@ public function testTIMEtoPHPObject()
232
232
public function testTIMEVALUE ($ expectedResult , ...$ args )
233
233
{
234
234
$ result = DateTime::TIMEVALUE (...$ args );
235
- $ this -> assertEquals ($ expectedResult , $ result , null , 1E-8 );
235
+ self :: assertEquals ($ expectedResult , $ result , null , 1E-8 );
236
236
}
237
237
238
238
public function providerTIMEVALUE ()
@@ -245,7 +245,7 @@ public function testTIMEVALUEtoPHP()
245
245
Functions::setReturnDateType (Functions::RETURNDATE_PHP_NUMERIC );
246
246
$ result = DateTime::TIMEVALUE ('7:30:20 ' );
247
247
Functions::setReturnDateType (Functions::RETURNDATE_EXCEL );
248
- $ this -> assertEquals (23420 , $ result , null , 1E-8 );
248
+ self :: assertEquals (23420 , $ result , null , 1E-8 );
249
249
}
250
250
251
251
public function testTIMEVALUEtoPHPObject ()
@@ -254,11 +254,11 @@ public function testTIMEVALUEtoPHPObject()
254
254
$ result = DateTime::TIMEVALUE ('7:30:20 ' );
255
255
Functions::setReturnDateType (Functions::RETURNDATE_EXCEL );
256
256
// Must return an object...
257
- $ this -> assertInternalType ('object ' , $ result );
257
+ self :: assertInternalType ('object ' , $ result );
258
258
// ... of the correct type
259
- $ this -> assertTrue (is_a ($ result , 'DateTime ' ));
259
+ self :: assertTrue (is_a ($ result , 'DateTime ' ));
260
260
// ... with the correct value
261
- $ this -> assertEquals ($ result ->format ('H:i:s ' ), '07:30:20 ' );
261
+ self :: assertEquals ($ result ->format ('H:i:s ' ), '07:30:20 ' );
262
262
}
263
263
264
264
/**
@@ -269,7 +269,7 @@ public function testTIMEVALUEtoPHPObject()
269
269
public function testHOUR ($ expectedResult , ...$ args )
270
270
{
271
271
$ result = DateTime::HOUROFDAY (...$ args );
272
- $ this -> assertEquals ($ expectedResult , $ result , null , 1E-8 );
272
+ self :: assertEquals ($ expectedResult , $ result , null , 1E-8 );
273
273
}
274
274
275
275
public function providerHOUR ()
@@ -285,7 +285,7 @@ public function providerHOUR()
285
285
public function testMINUTE ($ expectedResult , ...$ args )
286
286
{
287
287
$ result = DateTime::MINUTE (...$ args );
288
- $ this -> assertEquals ($ expectedResult , $ result , null , 1E-8 );
288
+ self :: assertEquals ($ expectedResult , $ result , null , 1E-8 );
289
289
}
290
290
291
291
public function providerMINUTE ()
@@ -301,7 +301,7 @@ public function providerMINUTE()
301
301
public function testSECOND ($ expectedResult , ...$ args )
302
302
{
303
303
$ result = DateTime::SECOND (...$ args );
304
- $ this -> assertEquals ($ expectedResult , $ result , null , 1E-8 );
304
+ self :: assertEquals ($ expectedResult , $ result , null , 1E-8 );
305
305
}
306
306
307
307
public function providerSECOND ()
@@ -317,7 +317,7 @@ public function providerSECOND()
317
317
public function testNETWORKDAYS ($ expectedResult , ...$ args )
318
318
{
319
319
$ result = DateTime::NETWORKDAYS (...$ args );
320
- $ this -> assertEquals ($ expectedResult , $ result , null , 1E-8 );
320
+ self :: assertEquals ($ expectedResult , $ result , null , 1E-8 );
321
321
}
322
322
323
323
public function providerNETWORKDAYS ()
@@ -333,7 +333,7 @@ public function providerNETWORKDAYS()
333
333
public function testWORKDAY ($ expectedResult , ...$ args )
334
334
{
335
335
$ result = DateTime::WORKDAY (...$ args );
336
- $ this -> assertEquals ($ expectedResult , $ result , null , 1E-8 );
336
+ self :: assertEquals ($ expectedResult , $ result , null , 1E-8 );
337
337
}
338
338
339
339
public function providerWORKDAY ()
@@ -349,7 +349,7 @@ public function providerWORKDAY()
349
349
public function testEDATE ($ expectedResult , ...$ args )
350
350
{
351
351
$ result = DateTime::EDATE (...$ args );
352
- $ this -> assertEquals ($ expectedResult , $ result , null , 1E-8 );
352
+ self :: assertEquals ($ expectedResult , $ result , null , 1E-8 );
353
353
}
354
354
355
355
public function providerEDATE ()
@@ -362,7 +362,7 @@ public function testEDATEtoPHP()
362
362
Functions::setReturnDateType (Functions::RETURNDATE_PHP_NUMERIC );
363
363
$ result = DateTime::EDATE ('2012-1-26 ' , -1 );
364
364
Functions::setReturnDateType (Functions::RETURNDATE_EXCEL );
365
- $ this -> assertEquals (1324857600 , $ result , null , 1E-8 );
365
+ self :: assertEquals (1324857600 , $ result , null , 1E-8 );
366
366
}
367
367
368
368
public function testEDATEtoPHPObject ()
@@ -371,11 +371,11 @@ public function testEDATEtoPHPObject()
371
371
$ result = DateTime::EDATE ('2012-1-26 ' , -1 );
372
372
Functions::setReturnDateType (Functions::RETURNDATE_EXCEL );
373
373
// Must return an object...
374
- $ this -> assertInternalType ('object ' , $ result );
374
+ self :: assertInternalType ('object ' , $ result );
375
375
// ... of the correct type
376
- $ this -> assertTrue (is_a ($ result , 'DateTime ' ));
376
+ self :: assertTrue (is_a ($ result , 'DateTime ' ));
377
377
// ... with the correct value
378
- $ this -> assertEquals ($ result ->format ('d-M-Y ' ), '26-Dec-2011 ' );
378
+ self :: assertEquals ($ result ->format ('d-M-Y ' ), '26-Dec-2011 ' );
379
379
}
380
380
381
381
/**
@@ -386,7 +386,7 @@ public function testEDATEtoPHPObject()
386
386
public function testEOMONTH ($ expectedResult , ...$ args )
387
387
{
388
388
$ result = DateTime::EOMONTH (...$ args );
389
- $ this -> assertEquals ($ expectedResult , $ result , null , 1E-8 );
389
+ self :: assertEquals ($ expectedResult , $ result , null , 1E-8 );
390
390
}
391
391
392
392
public function providerEOMONTH ()
@@ -399,7 +399,7 @@ public function testEOMONTHtoPHP()
399
399
Functions::setReturnDateType (Functions::RETURNDATE_PHP_NUMERIC );
400
400
$ result = DateTime::EOMONTH ('2012-1-26 ' , -1 );
401
401
Functions::setReturnDateType (Functions::RETURNDATE_EXCEL );
402
- $ this -> assertEquals (1325289600 , $ result , null , 1E-8 );
402
+ self :: assertEquals (1325289600 , $ result , null , 1E-8 );
403
403
}
404
404
405
405
public function testEOMONTHtoPHPObject ()
@@ -408,11 +408,11 @@ public function testEOMONTHtoPHPObject()
408
408
$ result = DateTime::EOMONTH ('2012-1-26 ' , -1 );
409
409
Functions::setReturnDateType (Functions::RETURNDATE_EXCEL );
410
410
// Must return an object...
411
- $ this -> assertInternalType ('object ' , $ result );
411
+ self :: assertInternalType ('object ' , $ result );
412
412
// ... of the correct type
413
- $ this -> assertTrue (is_a ($ result , 'DateTime ' ));
413
+ self :: assertTrue (is_a ($ result , 'DateTime ' ));
414
414
// ... with the correct value
415
- $ this -> assertEquals ($ result ->format ('d-M-Y ' ), '31-Dec-2011 ' );
415
+ self :: assertEquals ($ result ->format ('d-M-Y ' ), '31-Dec-2011 ' );
416
416
}
417
417
418
418
/**
@@ -423,7 +423,7 @@ public function testEOMONTHtoPHPObject()
423
423
public function testDATEDIF ($ expectedResult , ...$ args )
424
424
{
425
425
$ result = DateTime::DATEDIF (...$ args );
426
- $ this -> assertEquals ($ expectedResult , $ result , null , 1E-8 );
426
+ self :: assertEquals ($ expectedResult , $ result , null , 1E-8 );
427
427
}
428
428
429
429
public function providerDATEDIF ()
@@ -439,7 +439,7 @@ public function providerDATEDIF()
439
439
public function testDAYS360 ($ expectedResult , ...$ args )
440
440
{
441
441
$ result = DateTime::DAYS360 (...$ args );
442
- $ this -> assertEquals ($ expectedResult , $ result , null , 1E-8 );
442
+ self :: assertEquals ($ expectedResult , $ result , null , 1E-8 );
443
443
}
444
444
445
445
public function providerDAYS360 ()
@@ -455,7 +455,7 @@ public function providerDAYS360()
455
455
public function testYEARFRAC ($ expectedResult , ...$ args )
456
456
{
457
457
$ result = DateTime::YEARFRAC (...$ args );
458
- $ this -> assertEquals ($ expectedResult , $ result , null , 1E-8 );
458
+ self :: assertEquals ($ expectedResult , $ result , null , 1E-8 );
459
459
}
460
460
461
461
public function providerYEARFRAC ()
0 commit comments