Fixes #4. DEFAULT_TIME_ZONE is not defined.

This commit is contained in:
Travis Swientek 2013-09-04 09:50:50 -07:00
parent f8d1f73b18
commit 9438694415
2 changed files with 4 additions and 0 deletions

View File

@ -6,6 +6,7 @@ const SDK_USER_AGENT = "mailgun-sdk-php";
const RECIPIENT_COUNT_LIMIT = 1000; const RECIPIENT_COUNT_LIMIT = 1000;
const CAMPAIGN_ID_LIMIT = 3; const CAMPAIGN_ID_LIMIT = 3;
const TAG_LIMIT = 3; const TAG_LIMIT = 3;
const DEFAULT_TIME_ZONE = "UTC";
//Common Exception Messages //Common Exception Messages
const EXCEPTION_INVALID_CREDENTIALS = "Your credentials are incorrect."; const EXCEPTION_INVALID_CREDENTIALS = "Your credentials are incorrect.";

View File

@ -153,6 +153,9 @@ class MessageBuilderTest extends \Mailgun\Tests\MailgunTestCase{
$message->setDeliveryTime("January 15, 2014 8:00AM", "UTC"); $message->setDeliveryTime("January 15, 2014 8:00AM", "UTC");
$messageObj = $message->getMessage(); $messageObj = $message->getMessage();
$this->assertEquals(array("o:deliverytime" => "Wed, 15 Jan 2014 08:00:00 +0000"), $messageObj); $this->assertEquals(array("o:deliverytime" => "Wed, 15 Jan 2014 08:00:00 +0000"), $messageObj);
$message->setDeliveryTime("January 15, 2014 8:00AM");
$messageObj = $message->getMessage();
$this->assertEquals(array("o:deliverytime" => "Wed, 15 Jan 2014 08:00:00 +0000"), $messageObj);
$message->setDeliveryTime("1/15/2014 13:50:01", "CDT"); $message->setDeliveryTime("1/15/2014 13:50:01", "CDT");
$messageObj = $message->getMessage(); $messageObj = $message->getMessage();
$this->assertEquals(array("o:deliverytime" => "Wed, 15 Jan 2014 13:50:01 -0600"), $messageObj); $this->assertEquals(array("o:deliverytime" => "Wed, 15 Jan 2014 13:50:01 -0600"), $messageObj);