本文整理汇总了PHP中Tests\Framework\TestResources::listBlobsOneEntry方法的典型用法代码示例。如果您正苦于以下问题:PHP TestResources::listBlobsOneEntry方法的具体用法?PHP TestResources::listBlobsOneEntry怎么用?PHP TestResources::listBlobsOneEntry使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tests\Framework\TestResources
的用法示例。
在下文中一共展示了TestResources::listBlobsOneEntry方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testCreate
/**
* @covers WindowsAzure\Blob\Models\CreateBlobPagesResult::create
*/
public function testCreate()
{
// Setup
$sample = TestResources::listBlobsOneEntry();
$expected = $sample['Blobs']['Blob']['Properties'];
$expectedDate = Utilities::rfc1123ToDateTime($expected['Last-Modified']);
// Test
$actual = CreateBlobPagesResult::create($expected);
// Assert
$this->assertEquals($expectedDate, $actual->getLastModified());
$this->assertEquals($expected['Etag'], $actual->getETag());
$this->assertEquals($expected['Content-MD5'], $actual->getContentMD5());
$this->assertEquals(intval($expected['x-ms-blob-sequence-number']), $actual->getSequenceNumber());
}
示例2: testCreateWithOneEntry
/**
* @covers WindowsAzure\Blob\Models\ListBlobsResult::create
*/
public function testCreateWithOneEntry()
{
// Setup
$sample = TestResources::listBlobsOneEntry();
// Test
$actual = ListBlobsResult::create($sample);
// Assert
$this->assertCount(1, $actual->getBlobs());
$this->assertCount(1, $actual->getBlobPrefixes());
$this->assertEquals($sample['Marker'], $actual->getMarker());
$this->assertEquals(intval($sample['MaxResults']), $actual->getMaxResults());
$this->assertEquals($sample['NextMarker'], $actual->getNextMarker());
$this->assertEquals($sample['Delimiter'], $actual->getDelimiter());
$this->assertEquals($sample['Prefix'], $actual->getPrefix());
}
示例3: testCreate
/**
* @covers WindowsAzure\Blob\Models\BlobProperties::create
*/
public function testCreate()
{
// Setup
$sample = TestResources::listBlobsOneEntry();
$expected = $sample['Blobs']['Blob']['Properties'];
$expectedDate = Utilities::rfc1123ToDateTime($expected['Last-Modified']);
// Test
$actual = BlobProperties::create($expected);
// Assert
$this->assertEquals($expectedDate, $actual->getLastModified());
$this->assertEquals($expected['Etag'], $actual->getEtag());
$this->assertEquals(intval($expected['Content-Length']), $actual->getContentLength());
$this->assertEquals($expected['Content-Type'], $actual->getContentType());
$this->assertEquals($expected['Content-Encoding'], $actual->getContentEncoding());
$this->assertEquals($expected['Content-Language'], $actual->getContentLanguage());
$this->assertEquals($expected['Content-MD5'], $actual->getContentMD5());
$this->assertEquals($expected['Cache-Control'], $actual->getCacheControl());
$this->assertEquals(intval($expected['x-ms-blob-sequence-number']), $actual->getSequenceNumber());
$this->assertEquals($expected['BlobType'], $actual->getBlobType());
$this->assertEquals($expected['LeaseStatus'], $actual->getLeaseStatus());
}