Exemple #1
0
 /**
  * Test serial refreshing on different days.
  */
 public function testRefreshSerialDaychange()
 {
     $soa = new SOA();
     $soa->setSerial('2012050512');
     $soa->refreshSerial();
     $expect = date('Ymd') . '01';
     $this->assertEquals($expect, $soa->getSerial());
 }
Exemple #2
0
 /**
  * Get a default zone for new entries
  *
  * @return ZoneCollection
  */
 protected function _getDefaultZone()
 {
     $nsdefault = $this->_getConfigService()->getParameter('dns.default.ns');
     $zone = new ZoneCollection();
     $ns = new NS();
     $soa = new SOA();
     $soa->setPrimary($nsdefault)->setMail($this->getUser()->getEmail() . '.');
     $ns->setRdata($nsdefault);
     $zone->add($soa)->add($ns);
     return $zone;
 }