@@ -312,11 +312,21 @@ public function testLinkTag()
312312 $ this ->assertSame ($ expected , link_tag ($ target ));
313313 }
314314
315- public function testLinkTagComplete ()
315+ public function testLinkTagMedia ()
316316 {
317- $ target = 'https://styles.com/css/mystyles.css ' ;
318- $ expected = '<link href="https://styles.com/css/mystyles.css" rel="banana" type="fruit" media="VHS" title="Go away" /> ' ;
319- $ this ->assertSame ($ expected , link_tag ($ target , 'banana ' , 'fruit ' , 'Go away ' , 'VHS ' ));
317+ $ target = 'https://styles.com/css/mystyles.css ' ;
318+ $ tag = link_tag ($ target , 'stylesheet ' , 'text/css ' , '' , 'print ' );
319+
320+ $ expected = '<link href="https://styles.com/css/mystyles.css" rel="stylesheet" type="text/css" media="print" /> ' ;
321+ $ this ->assertSame ($ expected , $ tag );
322+ }
323+
324+ public function testLinkTagTitle ()
325+ {
326+ $ tag = link_tag ('default.css ' , 'stylesheet ' , 'text/css ' , 'Default Style ' );
327+
328+ $ expected = '<link href="http://example.com/default.css" rel="stylesheet" type="text/css" title="Default Style" /> ' ;
329+ $ this ->assertSame ($ expected , $ tag );
320330 }
321331
322332 public function testLinkTagFavicon ()
@@ -349,6 +359,18 @@ public function testLinkTagAlternate()
349359 $ this ->assertSame ($ expected , $ tag );
350360 }
351361
362+ public function testLinkTagArrayAlternate ()
363+ {
364+ $ tag = link_tag ([
365+ 'href ' => 'http://sp.example.com/ ' ,
366+ 'rel ' => 'alternate ' ,
367+ 'media ' => 'only screen and (max-width: 640px) ' ,
368+ ]);
369+
370+ $ expected = '<link href="http://sp.example.com/" rel="alternate" media="only screen and (max-width: 640px)" /> ' ;
371+ $ this ->assertSame ($ expected , $ tag );
372+ }
373+
352374 public function testLinkTagCanonical ()
353375 {
354376 $ tag = link_tag ('http://www.example.com/ ' , 'canonical ' );
0 commit comments