示例#1
0
 /**
  * {@inheritdoc}
  */
 public function expect($type, $rule, $key, array $expected)
 {
     if ($type === self::ARecords) {
         $this->check($type, $rule, $key, $expected, $this->DNSCollection->getARecords());
     } else {
         if ($type === self::AAAARecords) {
             $this->check($type, $rule, $key, $expected, $this->DNSCollection->getAAAARecords());
         } else {
             if ($type === self::MXRecords) {
                 $this->check($type, $rule, $key, $expected, $this->DNSCollection->getMXRecords());
             } else {
                 if ($type === self::TXTRecords) {
                     $this->check($type, $rule, $key, $expected, $this->DNSCollection->getTXTRecords());
                 } else {
                     if ($type === self::NSRecords) {
                         $this->check($type, $rule, $key, $expected, $this->DNSCollection->getNSRecords());
                     }
                 }
             }
         }
     }
     return $this;
 }
示例#2
0
 /**
  * Test the mx record
  *
  * @author Koen Blokland Visser
  * @author Richard Oosterhof
  */
 public function testMXRecordTest()
 {
     $this->DNSCollection->setMXRecords(['37.252.122.107', 30]);
     $this->DNSCollection->setMXRecords(['192.168.1.1', 10]);
     $this->assertSame([['37.252.122.107', 30], ['192.168.1.1', 10]], $this->DNSCollection->getMXRecords());
 }