|
@@ 139-150 (lines=12) @@
|
| 136 |
|
$this->assertEquals($expected, $response); |
| 137 |
|
} |
| 138 |
|
|
| 139 |
|
public function testComposeWithSubject() { |
| 140 |
|
$address = '[email protected]'; |
| 141 |
|
$subject = 'hello there'; |
| 142 |
|
$uri = "mailto:$address?subject=$subject"; |
| 143 |
|
|
| 144 |
|
$expected = new RedirectResponse('#mailto?to=' . urlencode($address) |
| 145 |
|
. '&subject=' . urlencode($subject)); |
| 146 |
|
|
| 147 |
|
$response = $this->controller->compose($uri); |
| 148 |
|
|
| 149 |
|
$this->assertEquals($expected, $response); |
| 150 |
|
} |
| 151 |
|
|
| 152 |
|
public function testComposeWithCc() { |
| 153 |
|
$address = '[email protected]'; |
|
@@ 152-163 (lines=12) @@
|
| 149 |
|
$this->assertEquals($expected, $response); |
| 150 |
|
} |
| 151 |
|
|
| 152 |
|
public function testComposeWithCc() { |
| 153 |
|
$address = '[email protected]'; |
| 154 |
|
$cc = '[email protected]'; |
| 155 |
|
$uri = "mailto:$address?cc=$cc"; |
| 156 |
|
|
| 157 |
|
$expected = new RedirectResponse('#mailto?to=' . urlencode($address) |
| 158 |
|
. '&cc=' . urlencode($cc)); |
| 159 |
|
|
| 160 |
|
$response = $this->controller->compose($uri); |
| 161 |
|
|
| 162 |
|
$this->assertEquals($expected, $response); |
| 163 |
|
} |
| 164 |
|
|
| 165 |
|
public function testComposeWithBcc() { |
| 166 |
|
$address = '[email protected]'; |
|
@@ 165-176 (lines=12) @@
|
| 162 |
|
$this->assertEquals($expected, $response); |
| 163 |
|
} |
| 164 |
|
|
| 165 |
|
public function testComposeWithBcc() { |
| 166 |
|
$address = '[email protected]'; |
| 167 |
|
$bcc = '[email protected]'; |
| 168 |
|
$uri = "mailto:$address?bcc=$bcc"; |
| 169 |
|
|
| 170 |
|
$expected = new RedirectResponse('#mailto?to=' . urlencode($address) |
| 171 |
|
. '&bcc=' . urlencode($bcc)); |
| 172 |
|
|
| 173 |
|
$response = $this->controller->compose($uri); |
| 174 |
|
|
| 175 |
|
$this->assertEquals($expected, $response); |
| 176 |
|
} |
| 177 |
|
|
| 178 |
|
public function testComposeWithMultilineBody() { |
| 179 |
|
$address = '[email protected]'; |
|
@@ 178-189 (lines=12) @@
|
| 175 |
|
$this->assertEquals($expected, $response); |
| 176 |
|
} |
| 177 |
|
|
| 178 |
|
public function testComposeWithMultilineBody() { |
| 179 |
|
$address = '[email protected]'; |
| 180 |
|
$body = 'Hi!\nWhat\'s up?\nAnother line'; |
| 181 |
|
$uri = "mailto:$address?body=$body"; |
| 182 |
|
|
| 183 |
|
$expected = new RedirectResponse('#mailto?to=' . urlencode($address) |
| 184 |
|
. '&body=' . urlencode($body)); |
| 185 |
|
|
| 186 |
|
$response = $this->controller->compose($uri); |
| 187 |
|
|
| 188 |
|
$this->assertEquals($expected, $response); |
| 189 |
|
} |
| 190 |
|
|
| 191 |
|
} |
| 192 |
|
|