@@ -140,6 +140,7 @@ public function testDelivery() {
140140			->method ('getAppValue ' )
141141			->with ('dav ' , 'invitation_link_recipients ' , 'yes ' )
142142			->willReturn ('yes ' );
143+ 		$ this mailer ->method ('validateMailAddress ' )->willReturn (true );
143144
144145		$ message$ this _testMessage ();
145146		$ this _expectSend ();
@@ -153,6 +154,7 @@ public function testFailedDelivery() {
153154			->method ('getAppValue ' )
154155			->with ('dav ' , 'invitation_link_recipients ' , 'yes ' )
155156			->willReturn ('yes ' );
157+ 		$ this mailer ->method ('validateMailAddress ' )->willReturn (true );
156158
157159		$ message$ this _testMessage ();
158160		$ this mailer 
@@ -163,12 +165,21 @@ public function testFailedDelivery() {
163165		$ this assertEquals ('5.0 ' , $ messagegetScheduleStatus ());
164166	}
165167
168+ 	public  function  testInvalidEmailDelivery () {
169+ 		$ this mailer ->method ('validateMailAddress ' )->willReturn (false );
170+ 
171+ 		$ message$ this _testMessage ();
172+ 		$ this plugin ->schedule ($ message
173+ 		$ this assertEquals ('5.0 ' , $ messagegetScheduleStatus ());
174+ 	}
175+ 
166176	public  function  testDeliveryWithNoCommonName () {
167177		$ this config 
168178	  ->expects ($ this at (1 ))
169179			->method ('getAppValue ' )
170180			->with ('dav ' , 'invitation_link_recipients ' , 'yes ' )
171181			->willReturn ('yes ' );
182+ 		$ this mailer ->method ('validateMailAddress ' )->willReturn (true );
172183
173184		$ message$ this _testMessage ();
174185		$ messagesenderName  = null ;
@@ -193,6 +204,7 @@ public function testNoMessageSendForPastEvents(array $veventParams, bool $expect
193204		$ this config 
194205	  ->method ('getAppValue ' )
195206	  ->willReturn ('yes ' );
207+ 		$ this mailer ->method ('validateMailAddress ' )->willReturn (true );
196208
197209		$ message$ this _testMessage ($ veventParams
198210
@@ -227,6 +239,7 @@ public function dataNoMessageSendForPastEvents() {
227239	 */ 
228240	public  function  testIncludeResponseButtons (string  $ config_settingstring  $ recipientbool  $ has_buttons
229241		$ message$ this _testMessage ([],$ recipient
242+ 		$ this mailer ->method ('validateMailAddress ' )->willReturn (true );
230243
231244		$ this _expectSend ($ recipienttrue , $ has_buttons
232245		$ this config 
@@ -256,6 +269,7 @@ public function testMessageSendWhenEventWithoutName() {
256269		$ this config 
257270			->method ('getAppValue ' )
258271			->willReturn ('yes ' );
272+ 		$ this mailer ->method ('validateMailAddress ' )->willReturn (true );
259273
260274		$ message$ this _testMessage (['SUMMARY '  => '' ]);
261275		$ this _expectSend ('frodo@hobb.it ' , true , true ,'Invitation: Untitled event ' );
0 commit comments