@@ -248,14 +248,20 @@ public function testLinkNoScheme()
248248
249249 self ::assertEquals ('<a href=" ' . $ url . '"> ' . $ url . '</a> ' , $ this ->instance ->convert ($ url ));
250250
251- $ url = 'dømi.fo ' ;
251+ $ url = 'dømi.fo ' ;
252252
253253 self ::assertEquals ('<a href="http:// ' . $ url . '"> ' . $ url . '</a> ' , $ this ->instance ->convert ($ url ));
254254
255- $ url = 'dømi.fo/dømi ' ;
255+ $ url = 'dømi.fo/dømi ' ;
256256
257257 self ::assertEquals ('<a href="http:// ' . $ url . '"> ' . $ url . '</a> ' , $ this ->instance ->convert ($ url ));
258+ }
259+
260+ public function testLinkNoSchemeShouldIgnoreEmail (): void
261+ {
262+ $ url = 'ABC hello@email.com CBA ' ;
258263
264+ self ::assertEquals ('ABC hello@email.com CBA ' , $ this ->instance ->convert ($ url ));
259265 }
260266
261267 /**
@@ -294,7 +300,10 @@ public function testAutoEscape()
294300
295301 $ url = 'https://example.com/?foo=bar&yoo=baz ' ;
296302
297- self ::assertEquals ('<a href=" ' . htmlspecialchars ($ url ) . '"> ' . htmlspecialchars ($ url ) . '</a> ' , $ autolink ->convert ($ url ));
303+ self ::assertEquals (
304+ '<a href=" ' . htmlspecialchars ($ url ) . '"> ' . htmlspecialchars ($ url ) . '</a> ' ,
305+ $ autolink ->convert ($ url )
306+ );
298307
299308 $ autolink ->autoEscape (false );
300309
@@ -304,11 +313,17 @@ public function testAutoEscape()
304313
305314 $ autolink ->autoEscape (true );
306315
307- self ::assertEquals ('<a href="mailto: ' . htmlspecialchars ($ url ) . '"> ' . htmlspecialchars ($ url ) . '</a> ' , $ autolink ->convertEmail ($ url ));
316+ self ::assertEquals (
317+ '<a href="mailto: ' . htmlspecialchars ($ url ) . '"> ' . htmlspecialchars ($ url ) . '</a> ' ,
318+ $ autolink ->convertEmail ($ url )
319+ );
308320
309321 $ autolink ->autoEscape (false );
310322
311- self ::assertEquals ('<a href="mailto: ' . $ url . '"> ' . htmlspecialchars ($ url ) . '</a> ' , $ autolink ->convertEmail ($ url ));
323+ self ::assertEquals (
324+ '<a href="mailto: ' . $ url . '"> ' . htmlspecialchars ($ url ) . '</a> ' ,
325+ $ autolink ->convertEmail ($ url )
326+ );
312327 }
313328
314329 public function testConvertEmail ()
@@ -361,7 +376,10 @@ public function testGetAndSetLinkBuilder()
361376 return $ url . json_encode ($ attribs );
362377 });
363378
364- self ::assertEquals ('http://google.com{"foo":"bar","href":"http:\/\/google.com"} ' , $ this ->instance ->link ('http://google.com ' , ['foo ' => 'bar ' ]));
379+ self ::assertEquals (
380+ 'http://google.com{"foo":"bar","href":"http:\/\/google.com"} ' ,
381+ $ this ->instance ->link ('http://google.com ' , ['foo ' => 'bar ' ])
382+ );
365383
366384 self ::assertInstanceOf ('Closure ' , $ this ->instance ->getLinkBuilder ());
367385 }
@@ -378,26 +396,26 @@ public function urlProvider()
378396 'http://www.projectup.net/blog/index.php?option=com_content&view=article&id=15726:-agile-&catid=8:pmp-pm&Itemid=18 ' ,
379397 'http://www.projectup.net/....../index.php?optio...... ' ,
380398 15 ,
381- 6
399+ 6 ,
382400 ],
383401 [
384402 'http://campus.asukademy.com/learning/job/84-find-internship-opportunity-through-platform.html ' ,
385403 'http://campus.asukademy.com/....../84-find-interns...... ' ,
386404 15 ,
387- 6
405+ 6 ,
388406 ],
389407 [
390408 'http://user:pass@campus.asukademy.com:8888/learning/job/84-find-internship-opportunity-through-platform.html ' ,
391409 'http://user:pass@campus.asukademy.com:8888/....../84-find-interns...... ' ,
392410 15 ,
393- 6
411+ 6 ,
394412 ],
395413 [
396414 'http://campus.asukademy.com/learning/job/84-find-internship-opportunity-through-platform.html ' ,
397415 'http://campus.asukademy.com/.../84-fi... ' ,
398416 5 ,
399- 3
400- ]
417+ 3 ,
418+ ],
401419 ];
402420 }
403421
0 commit comments