/** * @covers WindowsAzure\ServiceManagement\Models\UpdateServiceOptions::setDescription * @covers WindowsAzure\ServiceManagement\Models\UpdateServiceOptions::getDescription */ public function testSetDescription() { // Setup $options = new UpdateServiceOptions(); $expected = 'Description'; // Test $options->setDescription($expected); // Assert $this->assertEquals($expected, $options->getDescription()); }
/** * @covers WindowsAzure\ServiceManagement\ServiceManagementRestProxy::updateHostedService * @covers WindowsAzure\ServiceManagement\ServiceManagementRestProxy::_getHostedServicePath * @covers WindowsAzure\ServiceManagement\ServiceManagementRestProxy::_getPath * @group HostedService */ public function testUpdateHostedService() { // Setup $name = $this->getTestName(); $this->createHostedService($name); $options = new UpdateServiceOptions(); $expectedDesc = 'My description'; $expectedLabel = base64_encode('new label'); $options->setDescription($expectedDesc); $options->setLabel($expectedLabel); // Test $this->restProxy->updateHostedService($name, $options); // Assert $result = $this->restProxy->getHostedServiceProperties($name); $this->assertEquals($expectedDesc, $result->getHostedService()->getDescription()); $this->assertEquals($expectedLabel, $result->getHostedService()->getLabel()); }