/** * 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)); }
/** * Test getMXRecord */ public function testGetMXRecord() { $validator = new Validator\EmailAddress(array('mx' => true, 'allow' => Hostname::ALLOW_ALL)); $this->assertTrue($validator->isValid('*****@*****.**')); $result = $validator->getMXRecord(); $this->assertTrue(!empty($result)); }