Exemplo n.º 1
0
 /**
  * Creates CreateBlobPagesResult object from $parsed response in array 
  * representation
  * 
  * @param array $headers HTTP response headers
  * 
  * @return CreateBlobPagesResult
  */
 public static function create($headers)
 {
     $result = new CreateBlobPagesResult();
     $clean = array_change_key_case($headers);
     $date = $clean[Resources::LAST_MODIFIED];
     $date = Utilities::rfc1123ToDateTime($date);
     $result->setETag($clean[Resources::ETAG]);
     $result->setLastModified($date);
     $result->setContentMD5(Utilities::tryGetValue($clean, Resources::CONTENT_MD5));
     $result->setSequenceNumber(intval(Utilities::tryGetValue($clean, Resources::X_MS_BLOB_SEQUENCE_NUMBER)));
     return $result;
 }
 /**
  * @covers WindowsAzure\Blob\Models\CreateBlobPagesResult::setSequenceNumber
  * @covers WindowsAzure\Blob\Models\CreateBlobPagesResult::getSequenceNumber
  */
 public function testSetSequenceNumber()
 {
     // Setup
     $expected = 123;
     $options = new CreateBlobPagesResult();
     $options->setSequenceNumber($expected);
     // Test
     $options->setSequenceNumber($expected);
     // Assert
     $this->assertEquals($expected, $options->getSequenceNumber());
 }