Beispiel #1
0
 public function testBuild()
 {
     $zone = $this->buildTestZone();
     $zoneBuilder = new ZoneBuilder();
     $this->assertEquals($this->expected, $output = $zoneBuilder->build($zone));
     if (true == $this->getEnvVariable(self::PHP_ENV_PRINT_TEST_ZONE)) {
         $this->printBlock($output, 'TEST ZONE FILE');
     }
 }
Beispiel #2
0
 /**
  *
  */
 public function testReverseIpv6Record()
 {
     $origin = Toolbox::reverseIpv6('2001:f83:21');
     $soa = new ResourceRecord('@', Factory::Soa('example.com.', 'post.example.com.', 2015010101, 3600, 14400, 604800, 3600), null, Classes::INTERNET);
     $ns1 = new ResourceRecord('@', Factory::Ns('ns1.example.com.'), null, Classes::INTERNET);
     $ns2 = new ResourceRecord('@', Factory::Ns('ns2.example.com.'), null, Classes::INTERNET);
     $foo8 = new ResourceRecord('8', Factory::Ptr('foo8.example.com.'), null, Classes::INTERNET);
     $foo9 = new ResourceRecord('9', Factory::Ptr('foo9.example.com.'), null, Classes::INTERNET);
     $fooa = new ResourceRecord('a', Factory::Ptr('fooa.example.com.'), null, Classes::INTERNET);
     $foob = new ResourceRecord('b', Factory::Ptr('foob.example.com.'), null, Classes::INTERNET);
     $fooc = new ResourceRecord('c', Factory::Ptr('fooc.example.com.'), null, Classes::INTERNET);
     $zone = new Zone($origin, 14400, [$soa, $ns1, $ns2, $foo8, $foo9, $fooa, $foob, $fooc]);
     $builder = new ZoneBuilder();
     $this->assertEquals($this->expectedIpv6Record, $builder->build($zone));
     $this->bindTest($zone, $builder);
 }