Fix testHtml method with regexp
This commit is contained in:
parent
1b9619c6ba
commit
339592da14
@ -353,7 +353,7 @@ EOF
|
|||||||
public function testHtml()
|
public function testHtml()
|
||||||
{
|
{
|
||||||
$this->assertEquals('<img alt="Bar">', $this->createTestCrawler()->filterXPath('//a[5]')->html());
|
$this->assertEquals('<img alt="Bar">', $this->createTestCrawler()->filterXPath('//a[5]')->html());
|
||||||
$this->assertEquals('<input type="text" value="TextValue" name="TextName"><input type="submit" value="FooValue" name="FooName" id="FooId"><input type="button" value="BarValue" name="BarName" id="BarId"><button value="ButtonValue" name="ButtonName" id="ButtonId"></button>', trim($this->createTestCrawler()->filterXPath('//form[@id="FooFormId"]')->html()));
|
$this->assertEquals('<input type="text" value="TextValue" name="TextName"><input type="submit" value="FooValue" name="FooName" id="FooId"><input type="button" value="BarValue" name="BarName" id="BarId"><button value="ButtonValue" name="ButtonName" id="ButtonId"></button>', trim(preg_replace('~>\s+<~', '><', $this->createTestCrawler()->filterXPath('//form[@id="FooFormId"]')->html())));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$this->createTestCrawler()->filterXPath('//ol')->html();
|
$this->createTestCrawler()->filterXPath('//ol')->html();
|
||||||
|
Reference in New Issue
Block a user