File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -1133,6 +1133,38 @@ public function build()
1133
1133
1134
1134
public function testAssertHasSubject ()
1135
1135
{
1136
+ Container::getInstance ()->instance ('mailer ' , new class
1137
+ {
1138
+ public function render ()
1139
+ {
1140
+ //
1141
+ }
1142
+ });
1143
+
1144
+ $ mailable = new class () extends Mailable
1145
+ {
1146
+ public function build ()
1147
+ {
1148
+ //
1149
+ }
1150
+ };
1151
+
1152
+ try {
1153
+ $ mailable ->assertHasSubject ('Foo Subject ' );
1154
+ $ this ->fail ();
1155
+ } catch (AssertionFailedError $ e ) {
1156
+ $ this ->assertSame ("Did not see expected text [Foo Subject] in email subject. \nFailed asserting that false is true. " , $ e ->getMessage ());
1157
+ }
1158
+
1159
+ $ mailable = new class () extends Mailable
1160
+ {
1161
+ public function build ()
1162
+ {
1163
+ $ this ->subject ('Foo Subject ' );
1164
+ }
1165
+ };
1166
+
1167
+ $ mailable ->assertHasSubject ('Foo Subject ' );
1136
1168
}
1137
1169
1138
1170
public function testMailableHeadersGetSent ()
You can’t perform that action at this time.
0 commit comments