@@ 48-54 (lines=7) @@ | ||
45 | $this->assertFalse($validation->isValid("[email protected]", new EmailLexer())); |
|
46 | } |
|
47 | ||
48 | public function testDNSWarnings() |
|
49 | { |
|
50 | $validation = new DNSCheckValidation(); |
|
51 | $expectedWarnings = [NoDNSMXRecord::CODE => new NoDNSMXRecord()]; |
|
52 | $validation->isValid("[email protected]", new EmailLexer()); |
|
53 | $this->assertEquals($expectedWarnings, $validation->getWarnings()); |
|
54 | } |
|
55 | ||
56 | public function testNoDNSError() |
|
57 | { |
@@ 37-43 (lines=7) @@ | ||
34 | $this->assertTrue($validation->isValid('[email protected]', new EmailLexer())); |
|
35 | } |
|
36 | ||
37 | public function testDNSWarnings() |
|
38 | { |
|
39 | $validation = new MailboxCheckValidation(new SmtpSocketHelper(), '[email protected]'); |
|
40 | $expectedWarnings = [NoDNSMXRecord::CODE => new NoDNSMXRecord()]; |
|
41 | $validation->isValid('[email protected]', new EmailLexer()); |
|
42 | $this->assertEquals($expectedWarnings, $validation->getWarnings()); |
|
43 | } |
|
44 | ||
45 | public function testIllegalMailboxError() |
|
46 | { |