/** * 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::setLastModified */ public function testSetLastModified() { // Setup $getBlobMetadataResult = new SetBlobMetadataResult(); $expected = Utilities::rfc1123ToDateTime('Fri, 09 Oct 2009 21:04:30 GMT'); // Test $getBlobMetadataResult->setLastModified($expected); // Assert $actual = $getBlobMetadataResult->getLastModified(); $this->assertEquals($expected, $actual); }