From dc6cf34a6716217171b1ac196282a15983aa9fb1 Mon Sep 17 00:00:00 2001 From: Thomas GASC Date: Fri, 30 Dec 2016 14:45:44 +0100 Subject: [PATCH] fix #19 campaign START_DT value --- src/Request/CreateCampaign.php | 2 +- tests/Broadcast/CampaignTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Request/CreateCampaign.php b/src/Request/CreateCampaign.php index 6a20890..402bd27 100644 --- a/src/Request/CreateCampaign.php +++ b/src/Request/CreateCampaign.php @@ -20,7 +20,7 @@ */ class CreateCampaign { - const DATETIME_FORMAT = 'YmdHmi'; + const DATETIME_FORMAT = 'YmdHis'; /** * @var \XMLWriter $writer diff --git a/tests/Broadcast/CampaignTest.php b/tests/Broadcast/CampaignTest.php index 930cae6..c62b0f7 100644 --- a/tests/Broadcast/CampaignTest.php +++ b/tests/Broadcast/CampaignTest.php @@ -49,7 +49,7 @@ public function testXml() $this->assertEquals($campaign->getName(), (string) $document->CAMPAIGN['NAME']); $this->assertEquals($campaign->getFolderId(), (int) $document->CAMPAIGN['FOLDERID']); $this->assertEquals($campaign->getState(), (string) $document->CAMPAIGN['STATE']); - $this->assertEquals($campaign->getStartDate()->format(CreateCampaign::DATETIME_FORMAT), (string) $document->CAMPAIGN['START_DT']); + $this->assertEquals($campaign->getStartDate()->format('YmdHis'), (string) $document->CAMPAIGN['START_DT']); $this->assertEquals($campaign->getDescription(), (string) $document->CAMPAIGN['DESCRIPTION']); $this->assertEquals($campaign->getMaCategory(), (string) $document->CAMPAIGN['MACATEGORY']); $this->assertEquals($campaign->getProductId(), (int) $document->CAMPAIGN['PRODUCTID']);