Ejemplo n.º 1
0
 /**
  * @covers WindowsAzure\ServiceManagement\Models\Location::setDisplayName
  * @covers WindowsAzure\ServiceManagement\Models\Location::getDisplayName
  */
 public function testSetDisplayName()
 {
     // Setup
     $Location = new Location();
     $expected = 'DisplayName';
     // Test
     $Location->setDisplayName($expected);
     // Assert
     $this->assertEquals($expected, $Location->getDisplayName());
 }
 /**
  * Creates new ListLocationsResult from parsed response body.
  * 
  * @param array $parsed The parsed response body.
  * 
  * @return ListLocationsResult
  */
 public static function create($parsed)
 {
     $result = new ListLocationsResult();
     $result->_locations = array();
     $entries = array();
     if (!empty($parsed)) {
         $entries = Utilities::getArray($parsed[Resources::XTAG_LOCATION]);
     }
     foreach ($entries as $value) {
         $location = new Location();
         $location->setName(Utilities::tryGetValue($value, Resources::XTAG_NAME));
         $location->setDisplayName(Utilities::tryGetValue($value, Resources::XTAG_DISPLAY_NAME));
         $result->_locations[] = $location;
     }
     return $result;
 }