|
@@ 87-98 (lines=12) @@
|
| 84 |
|
$this->assertEquals($expected, $response); |
| 85 |
|
} |
| 86 |
|
|
| 87 |
|
public function testComposeWithSubject() { |
| 88 |
|
$address = '[email protected]'; |
| 89 |
|
$subject = 'hello there'; |
| 90 |
|
$uri = "mailto:$address?subject=$subject"; |
| 91 |
|
|
| 92 |
|
$expected = new RedirectResponse('#mailto?to=' . urlencode($address) |
| 93 |
|
. '&subject=' . urlencode($subject)); |
| 94 |
|
|
| 95 |
|
$response = $this->controller->compose($uri); |
| 96 |
|
|
| 97 |
|
$this->assertEquals($expected, $response); |
| 98 |
|
} |
| 99 |
|
|
| 100 |
|
public function testComposeWithCc() { |
| 101 |
|
$address = '[email protected]'; |
|
@@ 100-111 (lines=12) @@
|
| 97 |
|
$this->assertEquals($expected, $response); |
| 98 |
|
} |
| 99 |
|
|
| 100 |
|
public function testComposeWithCc() { |
| 101 |
|
$address = '[email protected]'; |
| 102 |
|
$cc = '[email protected]'; |
| 103 |
|
$uri = "mailto:$address?cc=$cc"; |
| 104 |
|
|
| 105 |
|
$expected = new RedirectResponse('#mailto?to=' . urlencode($address) |
| 106 |
|
. '&cc=' . urlencode($cc)); |
| 107 |
|
|
| 108 |
|
$response = $this->controller->compose($uri); |
| 109 |
|
|
| 110 |
|
$this->assertEquals($expected, $response); |
| 111 |
|
} |
| 112 |
|
|
| 113 |
|
public function testComposeWithBcc() { |
| 114 |
|
$address = '[email protected]'; |
|
@@ 113-124 (lines=12) @@
|
| 110 |
|
$this->assertEquals($expected, $response); |
| 111 |
|
} |
| 112 |
|
|
| 113 |
|
public function testComposeWithBcc() { |
| 114 |
|
$address = '[email protected]'; |
| 115 |
|
$bcc = '[email protected]'; |
| 116 |
|
$uri = "mailto:$address?bcc=$bcc"; |
| 117 |
|
|
| 118 |
|
$expected = new RedirectResponse('#mailto?to=' . urlencode($address) |
| 119 |
|
. '&bcc=' . urlencode($bcc)); |
| 120 |
|
|
| 121 |
|
$response = $this->controller->compose($uri); |
| 122 |
|
|
| 123 |
|
$this->assertEquals($expected, $response); |
| 124 |
|
} |
| 125 |
|
|
| 126 |
|
public function testComposeWithMultilineBody() { |
| 127 |
|
$address = '[email protected]'; |
|
@@ 126-137 (lines=12) @@
|
| 123 |
|
$this->assertEquals($expected, $response); |
| 124 |
|
} |
| 125 |
|
|
| 126 |
|
public function testComposeWithMultilineBody() { |
| 127 |
|
$address = '[email protected]'; |
| 128 |
|
$body = 'Hi!\nWhat\'s up?\nAnother line'; |
| 129 |
|
$uri = "mailto:$address?body=$body"; |
| 130 |
|
|
| 131 |
|
$expected = new RedirectResponse('#mailto?to=' . urlencode($address) |
| 132 |
|
. '&body=' . urlencode($body)); |
| 133 |
|
|
| 134 |
|
$response = $this->controller->compose($uri); |
| 135 |
|
|
| 136 |
|
$this->assertEquals($expected, $response); |
| 137 |
|
} |
| 138 |
|
|
| 139 |
|
} |
| 140 |
|
|