@@ 43-51 (lines=9) @@ | ||
40 | $this->assertEquals('42 foo.example.com.', $mx->toText()); |
|
41 | } |
|
42 | ||
43 | public function testOutputThrowsExceptionWhenMissingPreference(): void |
|
44 | { |
|
45 | $mx = new MX(); |
|
46 | $mx->setExchange('mail.google.com.'); |
|
47 | ||
48 | $this->expectException(\InvalidArgumentException::class); |
|
49 | $this->expectExceptionMessage('No preference has been set on MX object.'); |
|
50 | $mx->toText(); |
|
51 | } |
|
52 | ||
53 | public function testOutputThrowsExceptionWhenMissingExchange(): void |
|
54 | { |
|
@@ 53-61 (lines=9) @@ | ||
50 | $mx->toText(); |
|
51 | } |
|
52 | ||
53 | public function testOutputThrowsExceptionWhenMissingExchange(): void |
|
54 | { |
|
55 | $mx = new MX(); |
|
56 | $mx->setPreference(15); |
|
57 | ||
58 | $this->expectException(\InvalidArgumentException::class); |
|
59 | $this->expectExceptionMessage('No exchange has been set on MX object.'); |
|
60 | $mx->toText(); |
|
61 | } |
|
62 | ||
63 | public function testFromText(): void |
|
64 | { |