/**
  * @covers MicrosoftAzure\Storage\Queue\Models\MicrosoftAzureQueueMessage::setInsertionDate
  */
 public function testSetInsertionDate()
 {
     // Setup
     $azureQueueMessage = new MicrosoftAzureQueueMessage();
     $expected = 'Fri, 09 Oct 2009 21:04:30 GMT';
     // Test
     $azureQueueMessage->setInsertionDate($expected);
     // Assert
     $actual = $azureQueueMessage->getInsertionDate();
     $this->assertEquals($expected, $actual);
 }
 /**
  * Creates MicrosoftAzureQueueMessage object from parsed XML response of
  * PeekMessages.
  *
  * @param array $parsedResponse XML response parsed into array.
  * 
  * @return MicrosoftAzure\Storage\Queue\Models\MicrosoftAzureQueueMessage.
  */
 public static function createFromPeekMessages($parsedResponse)
 {
     $msg = new MicrosoftAzureQueueMessage();
     $expirationDate = $parsedResponse['ExpirationTime'];
     $insertionDate = $parsedResponse['InsertionTime'];
     $msg->setDequeueCount(intval($parsedResponse['DequeueCount']));
     $date = Utilities::rfc1123ToDateTime($expirationDate);
     $msg->setExpirationDate($date);
     $date = Utilities::rfc1123ToDateTime($insertionDate);
     $msg->setInsertionDate($date);
     $msg->setMessageId($parsedResponse['MessageId']);
     $msg->setMessageText($parsedResponse['MessageText']);
     return $msg;
 }