File tree Expand file tree Collapse file tree 1 file changed +24
-6
lines changed Expand file tree Collapse file tree 1 file changed +24
-6
lines changed Original file line number Diff line number Diff line change @@ -60,9 +60,9 @@ protected function fetchInbox($inboxId = null)
6060 $ this ->applyMailTrapConfiguration ($ inboxId );
6161 }
6262
63- return $ this ->requestClient ()-> get (
64- " /api/v1/inboxes/ { $ this ->mailTrapInboxId } /messages "
65- ) ->json ();
63+ return $ this ->requestClient ()
64+ -> get ( $ this ->getMailTrapMessagesUrl ())
65+ ->json ();
6666 }
6767
6868 /**
@@ -73,9 +73,27 @@ protected function fetchInbox($inboxId = null)
7373 */
7474 protected function emptyInbox ()
7575 {
76- $ this ->requestClient ()->patch (
77- "/api/v1/inboxes/ {$ this ->mailTrapInboxId }/clean " , ['future ' => true ]
78- );
76+ $ this ->requestClient ()->patch ($ this ->getMailTrapCleanUrl (), ['future ' => true ]);
77+ }
78+
79+ /**
80+ * Get the MailTrap messages endpoint.
81+ *
82+ * @return string
83+ */
84+ protected function getMailTrapMessagesUrl ()
85+ {
86+ return "/api/v1/inboxes/ {$ this ->mailTrapInboxId }/messages " ;
87+ }
88+
89+ /**
90+ * Get the MailTrap "empty inbox" endpoint.
91+ *
92+ * @return string
93+ */
94+ protected function getMailTrapCleanUrl ()
95+ {
96+ return "/api/v1/inboxes/ {$ this ->mailTrapInboxId }/clean " ;
7997 }
8098
8199 /**
You can’t perform that action at this time.
0 commit comments