コード例 #1
0
 /**
  * @covers MicrosoftAzure\Storage\Blob\BlobRestProxy::setServiceProperties
  */
 public function testSetServiceProperties()
 {
     $this->skipIfEmulated();
     // Setup
     $expected = ServiceProperties::create(TestResources::setServicePropertiesSample());
     // Test
     $this->setServiceProperties($expected);
     $actual = $this->restProxy->getServiceProperties();
     // Assert
     $this->assertEquals($expected->toXml($this->xmlSerializer), $actual->getValue()->toXml($this->xmlSerializer));
 }
コード例 #2
0
 /**
  * @covers MicrosoftAzure\Storage\Table\TableRestProxy::setServiceProperties
  * @covers MicrosoftAzure\Storage\Common\Internal\ServiceRestProxy::sendContext
  */
 public function testSetServicePropertiesWithEmptyParts()
 {
     $this->skipIfEmulated();
     // Setup
     $xml = TestResources::setServicePropertiesSample();
     $xml['HourMetrics']['RetentionPolicy'] = null;
     $expected = ServiceProperties::create($xml);
     // Test
     $this->setServiceProperties($expected);
     $actual = $this->restProxy->getServiceProperties();
     // Assert
     $this->assertEquals($expected->toXml($this->xmlSerializer), $actual->getValue()->toXml($this->xmlSerializer));
 }