Skip to content

Commit 9f23a9f

Browse files
committed
update assertions of DateTime and DateInterval returns
1 parent 00c5c56 commit 9f23a9f

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/AbstractSapRfcTestCase.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,13 +286,21 @@ public function testRemoteFunctionCallWithParametersAndResults()
286286
static::assertArrayHasKey('RFCINT4', $test_out, 'Missing RFCINT4 in TEST_OUT!');
287287
static::assertSame(416639, $test_out['RFCINT4'], 'Test IN and OUT of RFCINT4 don\'t match!');
288288
/**
289-
* Assert DateTime objects.
289+
* Assert DateTime and DateInterval objects.
290290
*/
291291
static::assertArrayHasKey('RFCTIME', $test_out, 'Missing RFCTIME in TEST_OUT!');
292292
static::assertArrayHasKey('RFCDATE', $test_out, 'Missing RFCDATE in TEST_OUT!');
293-
static::assertInstanceOf(\DateTime::class, $test_out['RFCTIME'], 'Test OUT of RFCTIME is not DateTime!');
294-
static::assertSame($testDateTime->format('H:i:s'), $test_out['RFCTIME']->format('H:i:s'));
295-
static::assertInstanceOf(\DateTime::class, $test_out['RFCDATE'], 'Test OUT of RFCDATE is not DateTime!');
293+
static::assertInstanceOf(
294+
\DateInterval::class,
295+
$test_out['RFCTIME'],
296+
'Test OUT of RFCTIME is not DateInterval!'
297+
);
298+
static::assertSame($testDateTime->format('H:i:s'), $test_out['RFCTIME']->format('%H:%i:%s'));
299+
static::assertInstanceOf(
300+
\DateTime::class,
301+
$test_out['RFCDATE'],
302+
'Test OUT of RFCDATE is not DateTime!'
303+
);
296304
static::assertSame($testDateTime->format('Y-m-d'), $test_out['RFCDATE']->format('Y-m-d'));
297305
/**
298306
* Assert hexadecimal value.

0 commit comments

Comments
 (0)