public static function getEnvironmentFromCloudApiData($environmentData)
 {
     $environment = new Environment($environmentData['name']);
     if (isset($environmentData['vcs_path'])) {
         $environment->setRevision($environmentData['vcs_path']);
     }
     if (isset($environmentData['ssh_host'])) {
         $environment->setDefaultHostName($environmentData['ssh_host']);
     }
     if (isset($environmentData['db_clusters'])) {
         $environment->setDatabaseClusterList($environmentData['db_clusters']);
     }
     if (isset($environmentData['default_domain']) && !empty($environmentData['default_domain'])) {
         $environment->setDefaultDomainName($environmentData['default_domain']);
         $nameParts = explode('.', $environmentData['default_domain']);
         $environment->setMachineName($nameParts[0]);
     }
     if (isset($environmentData['livedev'])) {
         $environment->setInLiveDev($environmentData['livedev'] != 'disabled');
     }
     if (isset($environmentData['unix_username'])) {
         $environment->setUnixUserName($environmentData['unix_username']);
     }
     return $environment;
 }
 protected function getBasicEnvironmentList()
 {
     $environmentList = new EnvironmentList();
     $childrenOfTitans = array_merge($this->childrenOfLeto, $this->childrenOfAtlas);
     foreach ($childrenOfTitans as $titanName) {
         $env = new Environment($titanName);
         $env->setMachineName('myapp' . $titanName);
         $env->setUnixUserName("myapp.{$titanName}");
         $environmentList->append($env);
     }
     return $environmentList;
 }
 /**
  * @covers ::setMachineName
  * @dataProvider nonStringProvider()
  * @expectedException \InvalidArgumentException
  */
 public function testMachineNamePropertyRejectsNonString($value)
 {
     $environment = new Environment('test');
     $environment->setMachineName($value);
 }