@@ 254-261 (lines=8) @@ | ||
251 | $this->assertArraySubset(array('Reply-To' => '"Mr. Test Alot" <[email protected]>'), $headers); |
|
252 | } |
|
253 | ||
254 | public function testFormatEmailAddress() |
|
255 | { |
|
256 | $archangel = new Archangel(); |
|
257 | $formatMethod = $this->getProtectedMethod('formatEmailAddress'); |
|
258 | $formattedEmail = $formatMethod->invokeArgs($archangel, array('[email protected]', '')); |
|
259 | ||
260 | $this->assertEquals('[email protected]', $formattedEmail); |
|
261 | } |
|
262 | ||
263 | public function testFormatEmailAddressWithTitle() |
|
264 | { |
|
@@ 263-270 (lines=8) @@ | ||
260 | $this->assertEquals('[email protected]', $formattedEmail); |
|
261 | } |
|
262 | ||
263 | public function testFormatEmailAddressWithTitle() |
|
264 | { |
|
265 | $archangel = new Archangel(); |
|
266 | $formatMethod = $this->getProtectedMethod('formatEmailAddress'); |
|
267 | $formattedEmail = $formatMethod->invokeArgs($archangel, array('[email protected]', 'Mr. Test Alot')); |
|
268 | ||
269 | $this->assertEquals('"Mr. Test Alot" <[email protected]>', $formattedEmail); |
|
270 | } |
|
271 | ||
272 | public function testSetSubject() |
|
273 | { |
|
@@ 796-809 (lines=14) @@ | ||
793 | $this->assertEquals($expectedMessage, $builtMessage); |
|
794 | } |
|
795 | ||
796 | public function testBuildPlainMessageHeader() |
|
797 | { |
|
798 | $expectedMessageHeader = array( |
|
799 | 'Content-Type: text/plain; charset="iso-8859"', |
|
800 | 'Content-Transfer-Encoding: 7bit', |
|
801 | '', |
|
802 | ); |
|
803 | ||
804 | $archangel = new Archangel(); |
|
805 | $buildMethod = $this->getProtectedMethod('buildPlainMessageHeader'); |
|
806 | $messageHeader = $buildMethod->invoke($archangel); |
|
807 | ||
808 | $this->assertEquals($expectedMessageHeader, $messageHeader); |
|
809 | } |
|
810 | ||
811 | public function testBuildHtmlMessageHeader() |
|
812 | { |
|
@@ 811-824 (lines=14) @@ | ||
808 | $this->assertEquals($expectedMessageHeader, $messageHeader); |
|
809 | } |
|
810 | ||
811 | public function testBuildHtmlMessageHeader() |
|
812 | { |
|
813 | $expectedMessageHeader = array( |
|
814 | 'Content-Type: text/html; charset="iso-8859-1"', |
|
815 | 'Content-Transfer-Encoding: 7bit', |
|
816 | '', |
|
817 | ); |
|
818 | ||
819 | $archangel = new Archangel(); |
|
820 | $buildMethod = $this->getProtectedMethod('buildHtmlMessageHeader'); |
|
821 | $messageHeader = $buildMethod->invoke($archangel); |
|
822 | ||
823 | $this->assertEquals($expectedMessageHeader, $messageHeader); |
|
824 | } |
|
825 | ||
826 | /** |
|
827 | * @dataProvider dataBuildHeaders |