/** * @covers WindowsAzure\ServiceManagement\Models\UpdateStorageServiceOptions::setDescription * @covers WindowsAzure\ServiceManagement\Models\UpdateStorageServiceOptions::getDescription */ public function testSetDescription() { // Setup $options = new UpdateStorageServiceOptions(); $expected = 'Description'; // Test $options->setDescription($expected); // Assert $this->assertEquals($expected, $options->getDescription()); }
/** * Updates the label and/or the description for a storage account in Windows * Azure. * * @param string $name The storage account name. * @param Models\UpdateStorageServiceOptions $options The optional parameters. * * @return none * * @see http://msdn.microsoft.com/en-us/library/windowsazure/hh264516.aspx */ public function updateStorageService($name, $options) { Validate::isString($name, 'name'); Validate::notNullOrEmpty($name, 'name'); $label = $options->getLabel(); $description = $options->getDescription(); Validate::isTrue(!empty($label) || !empty($description), Resources::INVALID_USA_OPT_MSG); $storageService = new StorageService(); $storageService->setLabel($options->getLabel()); $storageService->setDescription($options->getDescription()); $storageService->addSerializationProperty(XmlSerializer::ROOT_NAME, 'UpdateStorageServiceInput'); $context = new HttpCallContext(); $context->setMethod(Resources::HTTP_PUT); $context->setPath($this->_getStorageServicePath($name)); $context->addStatusCode(Resources::STATUS_OK); $context->setBody($storageService->serialize($this->dataSerializer)); $context->addHeader(Resources::CONTENT_TYPE, Resources::XML_ATOM_CONTENT_TYPE); $this->sendContext($context); }