/**
  * Test zones  get methods
  */
 public function testGetHostZones()
 {
     $virtualServer = new VirtualServerEntity();
     $virtualServer->setHostName('vz.test.example.com');
     $this->assertCount(4, $virtualServer->getHostZones());
     $this->assertEquals('com', $virtualServer->getHostZones()[0]);
     $this->assertEquals('vz', $virtualServer->getHostZones()[3]);
     $virtualServer->setHostName('localhost');
     $this->assertFalse($virtualServer->getHostZones());
 }
 /**
  * @dataProvider entityProvider
  *
  * @param array $entityData
  */
 public function testToArray(array $entityData)
 {
     $hardwareServer = new HardwareServerEntity();
     $hardwareServer->setDaemonPort($entityData['daemonPort'])->setDefaultOSTemplate($entityData['defaultOsTemplate'])->setDefaultServerTemplate($entityData['defaultServerTemplate'])->setDescription($entityData['description'])->setHost($entityData['host'])->setId($entityData['id'])->setUseSSL($entityData['useSsl'])->setVSwap($entityData['vswap']);
     $virtualServer = new VirtualServerEntity();
     $virtualServer->setHostName('localhost');
     $hardwareServer->setVirtualServers([$virtualServer, new VirtualServerEntity()]);
     $arrayData = $hardwareServer->__toArray();
     $this->assertTrue(is_array($arrayData));
     $this->assertCount(11, $arrayData);
     $this->assertEquals($entityData['host'], $arrayData['host']);
     $this->assertCount(2, $arrayData['virtualServers']);
     $this->assertEquals('localhost', $arrayData['virtualServers'][0]['hostName']);
 }