Пример #1
0
    /**
     * @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);
        }
    }
Пример #2
0
 /**
  * Testing getDomainCheck
  */
 public function testGetDomainCheck()
 {
     $this->assertTrue($this->_validator->getDomainCheck());
 }
Пример #3
0
 /**
  * @group ZF-11239
  */
 public function testNotSetHostnameValidator()
 {
     $hostname = $this->_validator->getHostnameValidator();
     $this->assertTrue($hostname instanceof Validator\Hostname);
 }