|
@@ 240-247 (lines=8) @@
|
| 237 |
|
$this->assertArraySubset(array('Reply-To' => '"Mr. Test Alot" <[email protected]>'), $headers); |
| 238 |
|
} |
| 239 |
|
|
| 240 |
|
public function testFormatEmailAddress() |
| 241 |
|
{ |
| 242 |
|
$archangel = new Archangel(); |
| 243 |
|
$formatMethod = $this->getProtectedMethod('formatEmailAddress'); |
| 244 |
|
$formattedEmail = $formatMethod->invokeArgs($archangel, array('[email protected]', '')); |
| 245 |
|
|
| 246 |
|
$this->assertEquals('[email protected]', $formattedEmail); |
| 247 |
|
} |
| 248 |
|
|
| 249 |
|
public function testFormatEmailAddressWithTitle() |
| 250 |
|
{ |
|
@@ 249-256 (lines=8) @@
|
| 246 |
|
$this->assertEquals('[email protected]', $formattedEmail); |
| 247 |
|
} |
| 248 |
|
|
| 249 |
|
public function testFormatEmailAddressWithTitle() |
| 250 |
|
{ |
| 251 |
|
$archangel = new Archangel(); |
| 252 |
|
$formatMethod = $this->getProtectedMethod('formatEmailAddress'); |
| 253 |
|
$formattedEmail = $formatMethod->invokeArgs($archangel, array('[email protected]', 'Mr. Test Alot')); |
| 254 |
|
|
| 255 |
|
$this->assertEquals('"Mr. Test Alot" <[email protected]>', $formattedEmail); |
| 256 |
|
} |
| 257 |
|
|
| 258 |
|
public function testSetSubject() |
| 259 |
|
{ |
|
@@ 770-783 (lines=14) @@
|
| 767 |
|
$this->assertEquals($expectedMessage, $builtMessage); |
| 768 |
|
} |
| 769 |
|
|
| 770 |
|
public function testBuildPlainMessageHeader() |
| 771 |
|
{ |
| 772 |
|
$expectedMessageHeader = array( |
| 773 |
|
'Content-Type: text/plain; charset="iso-8859"', |
| 774 |
|
'Content-Transfer-Encoding: 7bit', |
| 775 |
|
'', |
| 776 |
|
); |
| 777 |
|
|
| 778 |
|
$archangel = new Archangel(); |
| 779 |
|
$buildMethod = $this->getProtectedMethod('buildPlainMessageHeader'); |
| 780 |
|
$messageHeader = $buildMethod->invoke($archangel); |
| 781 |
|
|
| 782 |
|
$this->assertEquals($expectedMessageHeader, $messageHeader); |
| 783 |
|
} |
| 784 |
|
|
| 785 |
|
public function testBuildHtmlMessageHeader() |
| 786 |
|
{ |
|
@@ 785-798 (lines=14) @@
|
| 782 |
|
$this->assertEquals($expectedMessageHeader, $messageHeader); |
| 783 |
|
} |
| 784 |
|
|
| 785 |
|
public function testBuildHtmlMessageHeader() |
| 786 |
|
{ |
| 787 |
|
$expectedMessageHeader = array( |
| 788 |
|
'Content-Type: text/html; charset="iso-8859-1"', |
| 789 |
|
'Content-Transfer-Encoding: 7bit', |
| 790 |
|
'', |
| 791 |
|
); |
| 792 |
|
|
| 793 |
|
$archangel = new Archangel(); |
| 794 |
|
$buildMethod = $this->getProtectedMethod('buildHtmlMessageHeader'); |
| 795 |
|
$messageHeader = $buildMethod->invoke($archangel); |
| 796 |
|
|
| 797 |
|
$this->assertEquals($expectedMessageHeader, $messageHeader); |
| 798 |
|
} |
| 799 |
|
|
| 800 |
|
/** |
| 801 |
|
* @dataProvider dataBuildHeaders |