I updated my tests from Codeception 2.0.9 to 2.1.5.
Everything works fine except the PhpBrowser::grabAttributeFrom()
method. I'll get a PHPUnit exception like this:
[PHPUnit_Framework_Exception] DOMDocument::loadXML(): Entity 'nbsp' not defined in Entity, line: 3
or
[PHPUnit_Framework_Exception] DOMDocument::loadXML(): Opening and ending tag mismatch: img line 141 and a in Entity, line: 142
It seems, that the grabAttributeFrom
is very strict with HTML-DOM parsing. I googled the message and found, that the DOMDocument::loadHtml()
is a bit less strict and would work.
How can I fix this grabAttributeFrom? I need the content of a href/src
attribute of a HTML file.
Aucun commentaire:
Enregistrer un commentaire