@@ 67-78 (lines=12) @@ | ||
64 | $this->assertEquals($expected, $response); |
|
65 | } |
|
66 | ||
67 | public function testComposeWithSubject() { |
|
68 | $address = '[email protected]'; |
|
69 | $subject = 'hello there'; |
|
70 | $uri = "mailto:$address?subject=$subject"; |
|
71 | ||
72 | $expected = new RedirectResponse('#mailto=' . urlencode($address) |
|
73 | . '&subject=' . urlencode($subject)); |
|
74 | ||
75 | $response = $this->controller->compose($uri); |
|
76 | ||
77 | $this->assertEquals($expected, $response); |
|
78 | } |
|
79 | ||
80 | public function testComposeWithCc() { |
|
81 | $address = '[email protected]'; |
|
@@ 80-91 (lines=12) @@ | ||
77 | $this->assertEquals($expected, $response); |
|
78 | } |
|
79 | ||
80 | public function testComposeWithCc() { |
|
81 | $address = '[email protected]'; |
|
82 | $cc = '[email protected]'; |
|
83 | $uri = "mailto:$address?cc=$cc"; |
|
84 | ||
85 | $expected = new RedirectResponse('#mailto=' . urlencode($address) |
|
86 | . '&cc=' . urlencode($cc)); |
|
87 | ||
88 | $response = $this->controller->compose($uri); |
|
89 | ||
90 | $this->assertEquals($expected, $response); |
|
91 | } |
|
92 | ||
93 | public function testComposeWithBcc() { |
|
94 | $address = '[email protected]'; |
|
@@ 93-104 (lines=12) @@ | ||
90 | $this->assertEquals($expected, $response); |
|
91 | } |
|
92 | ||
93 | public function testComposeWithBcc() { |
|
94 | $address = '[email protected]'; |
|
95 | $bcc = '[email protected]'; |
|
96 | $uri = "mailto:$address?bcc=$bcc"; |
|
97 | ||
98 | $expected = new RedirectResponse('#mailto=' . urlencode($address) |
|
99 | . '&bcc=' . urlencode($bcc)); |
|
100 | ||
101 | $response = $this->controller->compose($uri); |
|
102 | ||
103 | $this->assertEquals($expected, $response); |
|
104 | } |
|
105 | ||
106 | public function testComposeWithMultilineBody() { |
|
107 | $address = '[email protected]'; |
|
@@ 106-117 (lines=12) @@ | ||
103 | $this->assertEquals($expected, $response); |
|
104 | } |
|
105 | ||
106 | public function testComposeWithMultilineBody() { |
|
107 | $address = '[email protected]'; |
|
108 | $body = 'Hi!\nWhat\'s up?\nAnother line'; |
|
109 | $uri = "mailto:$address?body=$body"; |
|
110 | ||
111 | $expected = new RedirectResponse('#mailto=' . urlencode($address) |
|
112 | . '&body=' . urlencode($body)); |
|
113 | ||
114 | $response = $this->controller->compose($uri); |
|
115 | ||
116 | $this->assertEquals($expected, $response); |
|
117 | } |
|
118 | ||
119 | } |
|
120 |