Skip to content

Commit

Permalink
adjusted Mock service, mock response and sample code to avoiding date…
Browse files Browse the repository at this point in the history
… parsing errors
  • Loading branch information
jpsilkjr86 committed Jul 18, 2018
1 parent c4c8b17 commit fd8b402
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/MarketplaceWebService/Mock.php
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,6 @@ public function getReportScheduleList($request)

private function invoke($actionName)
{
return $xml = file_get_contents('MarketplaceWebService/Mock/' . $actionName . 'Response.xml', /** search include path */ TRUE);
return $xml = file_get_contents(dirname(__FILE__) . '/Mock/' . $actionName . 'Response.xml', /** search include path */ TRUE);
}
}
2 changes: 1 addition & 1 deletion src/MarketplaceWebService/Mock/SubmitFeedResponse.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<FeedSubmissionInfo>
<FeedSubmissionId>string</FeedSubmissionId>
<FeedType>string</FeedType>
<SubmittedDate>string</SubmittedDate>
<SubmittedDate>2008-09-28T17:49:45</SubmittedDate>
<FeedProcessingStatus>string</FeedProcessingStatus>
<!--Optional:-->
<StartedProcessingDate>2008-09-28T18:49:45</StartedProcessingDate>
Expand Down
6 changes: 3 additions & 3 deletions src/MarketplaceWebService/Samples/SubmitFeedSample.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ function invokeSubmitFeed(MarketplaceWebService_Interface $service, $request)
if ($feedSubmissionInfo->isSetSubmittedDate())
{
echo(" SubmittedDate\n");
echo(" " . $feedSubmissionInfo->getSubmittedDate()->format(DATE_FORMAT) . "\n");
echo(" " . $feedSubmissionInfo->getSubmittedDate()->format('Y-m-d H:i:s') . "\n");
}
if ($feedSubmissionInfo->isSetFeedProcessingStatus())
{
Expand All @@ -223,12 +223,12 @@ function invokeSubmitFeed(MarketplaceWebService_Interface $service, $request)
if ($feedSubmissionInfo->isSetStartedProcessingDate())
{
echo(" StartedProcessingDate\n");
echo(" " . $feedSubmissionInfo->getStartedProcessingDate()->format(DATE_FORMAT) . "\n");
echo(" " . $feedSubmissionInfo->getStartedProcessingDate()->format('Y-m-d H:i:s') . "\n");
}
if ($feedSubmissionInfo->isSetCompletedProcessingDate())
{
echo(" CompletedProcessingDate\n");
echo(" " . $feedSubmissionInfo->getCompletedProcessingDate()->format(DATE_FORMAT) . "\n");
echo(" " . $feedSubmissionInfo->getCompletedProcessingDate()->format('Y-m-d H:i:s') . "\n");
}
}
}
Expand Down

0 comments on commit fd8b402

Please sign in to comment.