File tree 1 file changed +39
-9
lines changed
1 file changed +39
-9
lines changed Original file line number Diff line number Diff line change @@ -32,16 +32,46 @@ protected function cycleFragment($fragment)
32
32
public function testImageTagsInSvg ()
33
33
{
34
34
$ html = "<!DOCTYPE html>
35
- <html>
36
- <body>
37
- <svg>
38
- <image />
39
- </svg>
40
- <image></image>
41
- </body>
42
- </html> " ;
35
+ <html>
36
+ <head>
37
+ <title>foo</title>
38
+ </head>
39
+ <body>
40
+ <svg>
41
+ <image height= \"10 \" width= \"10 \"/>
42
+ </svg>
43
+ </body>
44
+ </html> " ;
43
45
$ doc = $ this ->html5 ->loadHTML ($ html );
44
- $ this ->assertXmlStringEqualsXmlString ($ html , $ this ->html5 ->saveHTML ($ doc ));
46
+ $ this ->assertInstanceOf ('DOMElement ' , $ doc ->getElementsByTagName ('image ' )->item (0 ));
47
+
48
+ $ html = "<!DOCTYPE html>
49
+ <html>
50
+ <head>
51
+ <title>foo</title>
52
+ </head>
53
+ <body>
54
+ <svg>
55
+ <image height= \"10 \" width= \"10 \"></image>
56
+ </svg>
57
+ </body>
58
+ </html> " ;
59
+ $ doc = $ this ->html5 ->loadHTML ($ html );
60
+ $ this ->assertInstanceOf ('DOMElement ' , $ doc ->getElementsByTagName ('image ' )->item (0 ));
61
+
62
+ $ html = "<!DOCTYPE html>
63
+ <html>
64
+ <head>
65
+ <title>foo</title>
66
+ </head>
67
+ <body>
68
+ <svg>
69
+ <image height= \"10 \" width= \"10 \">
70
+ </svg>
71
+ </body>
72
+ </html>> " ;
73
+ $ doc = $ this ->html5 ->loadHTML ($ html );
74
+ $ this ->assertInstanceOf ('DOMElement ' , $ doc ->getElementsByTagName ('image ' )->item (0 ));
45
75
}
46
76
47
77
public function testLoadOptions ()
You can’t perform that action at this time.
0 commit comments