当前位置: 首页>>代码示例>>PHP>>正文


PHP TestResources::listBlobsOneEntry方法代码示例

本文整理汇总了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());
 }
开发者ID:bitmovin,项目名称:azure-sdk-for-php,代码行数:17,代码来源:CreateBlobPagesResultTest.php

示例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());
 }
开发者ID:rdohms,项目名称:azure-sdk-for-php,代码行数:18,代码来源:ListBlobsResultTest.php

示例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());
 }
开发者ID:rdohms,项目名称:azure-sdk-for-php,代码行数:24,代码来源:BlobPropertiesTest.php


注:本文中的Tests\Framework\TestResources::listBlobsOneEntry方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。