예제 #1
0
파일: Role.php 프로젝트: mat33470/PFA
 /**
  * Creates a new Role from parsed response body.
  * 
  * @param array $parsed The parsed response body in array representation.
  * 
  * @return Role
  */
 public static function create($parsed)
 {
     $role = new Role();
     $roleName = Utilities::tryGetValue($parsed, Resources::XTAG_ROLE_NAME);
     $osVersion = Utilities::tryGetValue($parsed, Resources::XTAG_OS_VERSION);
     $role->setOsVersion($osVersion);
     $role->setRoleName($roleName);
     return $role;
 }
예제 #2
0
 /**
  * @covers WindowsAzure\ServiceManagement\Models\Role::setOsVersion
  * @covers WindowsAzure\ServiceManagement\Models\Role::getOsVersion
  */
 public function testSetOsVersion()
 {
     // Setup
     $expected = 'osversion';
     $role = new Role();
     // Test
     $role->setOsVersion($expected);
     // Assert
     $this->assertEquals($expected, $role->getOsVersion());
 }