本文整理汇总了PHP中Tests\Framework\TestResources::listMessagesSample方法的典型用法代码示例。如果您正苦于以下问题:PHP TestResources::listMessagesSample方法的具体用法?PHP TestResources::listMessagesSample怎么用?PHP TestResources::listMessagesSample使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tests\Framework\TestResources
的用法示例。
在下文中一共展示了TestResources::listMessagesSample方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testCreateFromPeekMessages
/**
* @covers WindowsAzure\Queue\Models\WindowsAzureQueueMessage::createFromPeekMessages
*/
public function testCreateFromPeekMessages()
{
// Setup
$sample = TestResources::listMessagesSample();
$sample = $sample['QueueMessage'];
// Test
$actual = WindowsAzureQueueMessage::createFromPeekMessages($sample);
// Assert
$this->assertEquals($sample['MessageId'], $actual->getMessageId());
$this->assertEquals(Utilities::rfc1123ToDateTime($sample['InsertionTime']), $actual->getInsertionDate());
$this->assertEquals(Utilities::rfc1123ToDateTime($sample['ExpirationTime']), $actual->getExpirationDate());
$this->assertEquals(intval($sample['DequeueCount']), $actual->getDequeueCount());
$this->assertEquals($sample['MessageText'], $actual->getMessageText());
}
示例2: testSetQueueMessages
/**
* @covers WindowsAzure\Queue\Models\ListMessagesResult::setQueueMessages
*/
public function testSetQueueMessages()
{
// Setup
$sample = TestResources::listMessagesSample();
$expectedMessageId = '1234b585-0ac3-4e2a-ad0c-18e3992brca1';
$result = ListMessagesResult::create($sample);
$expected = $result->getQueueMessages();
$expected[0]->setMessageId($expectedMessageId);
// Test
$result->setQueueMessages($expected);
$this->assertEquals($expected, $result->getQueueMessages());
}