File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -777,6 +777,17 @@ public function subject($subject)
777
777
return $ this ;
778
778
}
779
779
780
+ /**
781
+ * Determine if the mailable has the given subject.
782
+ *
783
+ * @param string $subject
784
+ * @return bool
785
+ */
786
+ public function hasSubject ($ subject )
787
+ {
788
+ return $ this ->subject === $ subject ;
789
+ }
790
+
780
791
/**
781
792
* Set the Markdown template for the message.
782
793
*
Original file line number Diff line number Diff line change @@ -304,6 +304,13 @@ public function testMailableSetsFromCorrectly()
304
304
}
305
305
}
306
306
307
+ public function testMailableSetsSubjectCorrectly ()
308
+ {
309
+ $ mailable = new WelcomeMailableStub ;
310
+ $ mailable ->subject ('foo ' );
311
+ $ this ->assertTrue ($ mailable ->hasSubject ('foo ' ));
312
+ }
313
+
307
314
public function testItIgnoresDuplicatedRawAttachments ()
308
315
{
309
316
$ mailable = new WelcomeMailableStub ;
You can’t perform that action at this time.
0 commit comments