@@ -136,6 +136,92 @@ public function testMailableAssertInOrderHtmlFailsWhenAbsentInOrder()
136
136
'<li>Third Item</li> ' ,
137
137
]);
138
138
}
139
+
140
+ public function testMailableAssertSeeInTextWithApostrophePassesWhenPresent ()
141
+ {
142
+ $ mailable = new MailableAssertionsStub ;
143
+
144
+ $ mailable ->assertSeeInText ("It's a wonderful day " );
145
+ }
146
+
147
+ public function testMailableAssertSeeInTextWithApostropheFailsWhenAbsent ()
148
+ {
149
+ $ mailable = new MailableAssertionsStub ;
150
+
151
+ $ this ->expectException (AssertionFailedError::class);
152
+
153
+ $ mailable ->assertSeeInText ("It's not a wonderful day " );
154
+ }
155
+
156
+ public function testMailableAssertDontSeeInTextWithApostrophePassesWhenAbsent ()
157
+ {
158
+ $ mailable = new MailableAssertionsStub ;
159
+
160
+ $ mailable ->assertDontSeeInText ("It's not a wonderful day " );
161
+ }
162
+
163
+ public function testMailableAssertDontSeeInTextWithApostropheFailsWhenPresent ()
164
+ {
165
+ $ mailable = new MailableAssertionsStub ;
166
+
167
+ $ this ->expectException (AssertionFailedError::class);
168
+
169
+ $ mailable ->assertDontSeeInText ("It's a wonderful day " );
170
+ }
171
+
172
+ public function testMailableAssertSeeInHtmlWithApostropheFailsWhenAbsent ()
173
+ {
174
+ $ mailable = new MailableAssertionsStub ;
175
+
176
+ $ this ->expectException (AssertionFailedError::class);
177
+
178
+ $ mailable ->assertSeeInHtml ("<li>It's not a wonderful day</li> " );
179
+ }
180
+
181
+ public function testMailableAssertDontSeeInHtmlWithApostrophePassesWhenAbsent ()
182
+ {
183
+ $ mailable = new MailableAssertionsStub ;
184
+
185
+ $ mailable ->assertDontSeeInHtml ("<li>It's not a wonderful day</li> " );
186
+ }
187
+
188
+ public function testMailableAssertDontSeeInHtmlWithApostropheFailsWhenPresent ()
189
+ {
190
+ $ mailable = new MailableAssertionsStub ;
191
+
192
+ $ this ->expectException (AssertionFailedError::class);
193
+
194
+ $ mailable ->assertDontSeeInHtml ("<li>It's a wonderful day</li> " , false );
195
+ }
196
+
197
+ public function testMailableAssertSeeInOrderInHtmlWithApostrophePassesWhenPresentInOrder ()
198
+ {
199
+ $ mailable = new MailableAssertionsStub ;
200
+
201
+ $ mailable ->assertSeeInOrderInHtml ([
202
+ 'First Item ' ,
203
+ 'Sixth Item ' ,
204
+ 'It \'s a wonderful day ' ,
205
+ ]);
206
+
207
+ $ mailable ->assertSeeInOrderInHtml ([
208
+ '<li>First Item</li> ' ,
209
+ '<li>It \'s a wonderful day</li> ' ,
210
+ ], false );
211
+ }
212
+
213
+ public function testMailableAssertSeeInOrderInHtmlWithApostropheFailsWhenAbsentInOrder ()
214
+ {
215
+ $ mailable = new MailableAssertionsStub ;
216
+
217
+ $ this ->expectException (AssertionFailedError::class);
218
+
219
+ $ mailable ->assertSeeInOrderInHtml ([
220
+ 'It \'s a wonderful day ' ,
221
+ 'First Item ' ,
222
+ 'Sixth Item ' ,
223
+ ]);
224
+ }
139
225
}
140
226
141
227
class MailableAssertionsStub extends Mailable
@@ -149,6 +235,7 @@ protected function renderForAssertions()
149
235
- Third Item
150
236
- Fourth & Fifth Item
151
237
- Sixth Item
238
+ - It's a wonderful day
152
239
EOD;
153
240
154
241
$ html = <<<'EOD'
@@ -167,6 +254,7 @@ protected function renderForAssertions()
167
254
<li>Third Item</li>
168
255
<li>Fourth & Fifth Item</li>
169
256
<li>Sixth Item</li>
257
+ <li>It's a wonderful day</li>
170
258
</ul>
171
259
</body>
172
260
</html>
0 commit comments