/** * Creates GetBlobResult from getBlob call. * * @param array $headers The HTTP response headers. * @param string $body The response body. * @param array $metadata The blob metadata. * * @return GetBlobResult */ public static function create($headers, $body, $metadata) { $result = new GetBlobResult(); $result->setContentStream(Utilities::stringToStream($body)); $result->setProperties(BlobProperties::create($headers)); $result->setMetadata(is_null($metadata) ? array() : $metadata); return $result; }
/** * @covers MicrosoftAzure\Storage\Blob\Models\GetBlobResult::getProperties */ public function testGetProperties() { // Setup $properties = new GetBlobResult(); $expected = new BlobProperties(); $properties->setProperties($expected); // Test $actual = $properties->getProperties(); // Assert $this->assertEquals($expected, $actual); }