Esempio n. 1
0
 /**
  * Test getMXRecord
  */
 public function testGetMXRecord()
 {
     if (!defined('TESTS_ZEND_VALIDATE_ONLINE_ENABLED') || !constant('TESTS_ZEND_VALIDATE_ONLINE_ENABLED')) {
         $this->markTestSkipped('Testing MX records has been disabled');
         return;
     }
     $validator = new Validator\EmailAddress(array('useMxCheck' => true, 'allow' => Hostname::ALLOW_ALL));
     if (!$validator->isMxSupported()) {
         $this->markTestSkipped('Testing MX records is not supported with this configuration');
         return;
     }
     $this->assertTrue($validator->isValid('*****@*****.**'));
     $result = $validator->getMXRecord();
     $this->assertTrue(!empty($result));
 }