/** * @covers WindowsAzure\ServiceManagement\Models\ListLocationsResult::setLocations * @covers WindowsAzure\ServiceManagement\Models\ListLocationsResult::getLocations */ public function testSetLocations() { // Setup $result = new ListLocationsResult(); $expected = array('Anywhere US', 'West US'); // Test $result->setLocations($expected); // Assert $this->assertEquals($expected, $result->getLocations()); }
/** * Lists all of the data center locations that are valid for your subscription. * * @return Models\ListLocationsResult * * @see http://msdn.microsoft.com/en-us/library/windowsazure/gg441293.aspx */ public function listLocations() { $context = new HttpCallContext(); $context->setMethod(Resources::HTTP_GET); $context->setPath($this->_getLocationPath()); $context->addStatusCode(Resources::STATUS_OK); $response = $this->sendContext($context); $serialized = $this->dataSerializer->unserialize($response->getBody()); return ListLocationsResult::create($serialized); }