/** * Creates SetBlobMetadataResult from response headers. * * @param array $headers response headers * * @return SetBlobMetadataResult */ public static function create($headers) { $result = new SetBlobMetadataResult(); $date = $headers[Resources::LAST_MODIFIED]; $result->setLastModified(Utilities::rfc1123ToDateTime($date)); $result->setETag($headers[Resources::ETAG]); return $result; }
/** * @covers MicrosoftAzure\Storage\Blob\Models\SetBlobMetadataResult::setETag */ public function testSetETag() { // Setup $getBlobMetadataResult = new SetBlobMetadataResult(); $expected = '0x8CACB9BD7C6B1B2'; // Test $getBlobMetadataResult->setETag($expected); // Assert $actual = $getBlobMetadataResult->getETag(); $this->assertEquals($expected, $actual); }