/** * @group ZF2-130 */ public function testUseMxRecordsBasicInvalid() { $validator = new Validator\EmailAddress(array( 'useMxCheck' => true, 'useDeepMxCheck' => true )); $emailAddresses = array( '', 'bob @domain.com', 'bob jones@domain.com', '*****@*****.**', '*****@*****.**', '*****@*****.**', '"*****@*****.**', '*****@*****.**', 'bob+domain.com', 'bob.domain.com', 'bob @domain.com', 'bob@ domain.com', 'bob @ domain.com', '*****@*****.**' ); foreach ($emailAddresses as $input) { $this->assertFalse($validator->isValid($input), implode("\n", $this->_validator->getMessages()) . $input); } }
/** * Testing getDomainCheck */ public function testGetDomainCheck() { $this->assertTrue($this->_validator->getDomainCheck()); }
/** * @group ZF-11239 */ public function testNotSetHostnameValidator() { $hostname = $this->_validator->getHostnameValidator(); $this->assertTrue($hostname instanceof Validator\Hostname); }