@@ -32,26 +32,23 @@ public function testParse()
32
32
33
33
self ::assertSame (['prerender ' ], $ links [0 ]->getRels ());
34
34
self ::assertSame ('/1 ' , $ links [0 ]->getHref ());
35
- self ::assertSame (null , $ links [0 ]->getAttribute ( ' rel ' ));
35
+ self ::assertSame ([] , $ links [0 ]->getAttributes ( ));
36
36
37
37
self ::assertSame (['dns-prefetch ' ], $ links [1 ]->getRels ());
38
38
self ::assertSame ('/2 ' , $ links [1 ]->getHref ());
39
- self ::assertSame (' 0.7 ' , $ links [1 ]->getAttribute ( ' pr ' ));
39
+ self ::assertSame ([ ' pr ' => ' 0.7 '] , $ links [1 ]->getAttributes ( ));
40
40
41
41
self ::assertSame (['preload ' ], $ links [2 ]->getRels ());
42
42
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 ());
45
44
46
45
self ::assertSame (['preload ' ], $ links [3 ]->getRels ());
47
46
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 ());
50
48
51
49
self ::assertSame (['alternate ' , 'next ' ], $ links [4 ]->getRels ());
52
50
F0F6
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 ());
55
52
}
56
53
57
54
public function testParseEmpty ()
0 commit comments