Skip to content

Commit 823c468

Browse files
committed
AC-9030::Fedex API Upgrade - Fix PHPUnit and Static Test
1 parent 88ea57e commit 823c468

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

app/code/Magento/Fedex/Model/Carrier.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1804,13 +1804,12 @@ private function getDeliveryDateTime($trackInfo) : \Datetime | null
18041804
($dateAndTimeInfo['type'] == 'ESTIMATED_DELIVERY' || $dateAndTimeInfo['type'] == 'ACTUAL_DELIVERY')
18051805
&& !empty($dateAndTimeInfo['dateTime'])
18061806
) {
1807-
$timestamp = $dateAndTimeInfo['dateTime'];
1807+
$timestamp = $this->parseDate($dateAndTimeInfo['dateTime']);
18081808
break;
18091809
}
18101810
}
18111811
}
18121812

1813-
$timestamp = $timestamp ? $this->parseDate($timestamp) : null;
18141813
return $timestamp ?: null;
18151814
}
18161815

app/code/Magento/Fedex/Test/Unit/Model/CarrierTest.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,15 @@ class CarrierTest extends TestCase
117117
*/
118118
private $curlFactory;
119119

120+
/**
121+
* @var Curl
122+
*/
123+
private $curlClient;
124+
125+
/**
126+
* @return void
127+
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
128+
*/
120129
protected function setUp(): void
121130
{
122131
$this->helper = new ObjectManager($this);
@@ -647,7 +656,7 @@ public function getAccessToken() : array
647656
* @param string $expectedTime
648657
* @dataProvider shipDateDataProvider
649658
*/
650-
public function testGetTracking($tracking, $shipTimeStamp, $expectedDate, $expectedTime, $callNum = 1)
659+
public function testGetTracking($tracking, $shipTimeStamp, $expectedDate, $expectedTime)
651660
{
652661
$trackRequest = $this->getTrackRequest($tracking);
653662
$trackResponse = $this->getTrackResponse($shipTimeStamp, $expectedDate, $expectedTime);

0 commit comments

Comments
 (0)