@@ -32,26 +32,23 @@ public function testParse()
3232
3333 self ::assertSame (['prerender ' ], $ links [0 ]->getRels ());
3434 self ::assertSame ('/1 ' , $ links [0 ]->getHref ());
35- self ::assertSame (null , $ links [0 ]->getAttribute ( ' rel ' ));
35+ self ::assertSame ([] , $ links [0 ]->getAttributes ( ));
3636
3737 self ::assertSame (['dns-prefetch ' ], $ links [1 ]->getRels ());
3838 self ::assertSame ('/2 ' , $ links [1 ]->getHref ());
39- self ::assertSame (' 0.7 ' , $ links [1 ]->getAttribute ( ' pr ' ));
39+ self ::assertSame ([ ' pr ' => ' 0.7 '] , $ links [1 ]->getAttributes ( ));
4040
4141 self ::assertSame (['preload ' ], $ links [2 ]->getRels ());
4242 self ::assertSame ('/3 ' , $ links [2 ]->getHref ());
43- self ::assertSame ('script ' , $ links [2 ]->getAttribute ('as ' ));
44- self ::assertSame (null , $ links [2 ]->getAttribute ('nopush ' ));
43+ self ::assertSame (['as ' => 'script ' ], $ links [2 ]->getAttributes ());
4544
4645 self ::assertSame (['preload ' ], $ links [3 ]->getRels ());
4746 self ::assertSame ('/4 ' , $ links [3 ]->getHref ());
48- self ::assertSame ('image ' , $ links [3 ]->getAttribute ('as ' ));
49- self ::assertSame (true , $ links [3 ]->getAttribute ('nopush ' ));
47+ self ::assertSame (['as ' => 'image ' , 'nopush ' => true ], $ links [3 ]->getAttributes ());
5048
5149 self ::assertSame (['alternate ' , 'next ' ], $ links [4 ]->getRels ());
5250 self ::assertSame ('/5 ' , $ links [4 ]->getHref ());
53- self ::assertSame (['fr ' , 'de ' ], $ links [4 ]->getAttribute ('hreflang ' ));
54- self ::assertSame ('Hello ' , $ links [4 ]->getAttribute ('title ' ));
51+ self ::assertSame (['hreflang ' => ['fr ' , 'de ' ], 'title ' => 'Hello ' ], $ links [4 ]->getAttributes ());
5552 }
5653
5754 public function testParseEmpty ()
0 commit comments