@@ 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 | { |
@@ 35-41 (lines=7) @@ | ||
32 | $this->assertTrue($validation->isValid('[email protected]', new EmailLexer())); |
|
33 | } |
|
34 | ||
35 | public function testDNSWarnings() |
|
36 | { |
|
37 | $validation = new MailboxCheckValidation(new SmtpSocketHelper(), '[email protected]'); |
|
38 | $expectedWarnings = [NoDNSMXRecord::CODE => new NoDNSMXRecord()]; |
|
39 | $validation->isValid('[email protected]', new EmailLexer()); |
|
40 | $this->assertEquals($expectedWarnings, $validation->getWarnings()); |
|
41 | } |
|
42 | ||
43 | public function testIllegalMailboxError() |
|
44 | { |