File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,11 @@ public function process(\DOMElement $mediaNode, $mediaParentTag)
31
31
if ($ attribute ->nodeType != XML_ELEMENT_NODE ) {
32
32
continue ;
33
33
}
34
- if ($ attribute ->tagName == 'background ' ) {
34
+ $ attributeTagName = $ attribute ->tagName ;
35
+ if ($ attributeTagName === 'background ' ) {
35
36
$ nodeValue = $ this ->processImageBackground ($ attribute ->nodeValue );
37
+ } elseif ($ attributeTagName === 'width ' || $ attributeTagName === 'height ' ) {
38
+ $ nodeValue = intval ($ attribute ->nodeValue );
36
39
} else {
37
40
$ nodeValue = $ attribute ->nodeValue ;
38
41
}
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ protected function setUp()
23
23
public function testProcess ()
24
24
{
25
25
$ expectedArray = include (__DIR__ . '/_files/converted_view.php ' );
26
- $ this ->assertEquals ($ expectedArray , $ this ->model ->process ($ this ->getDomElement (), 'media ' ));
26
+ $ this ->assertSame ($ expectedArray , $ this ->model ->process ($ this ->getDomElement (), 'media ' ));
27
27
}
28
28
29
29
/**
You can’t perform that action at this time.
0 commit comments