Symfony\Component\DomCrawler\Tests\CrawlerTest::testAddXmlContent PHP Method

testAddXmlContent() public method

public testAddXmlContent ( )
    public function testAddXmlContent()
    {
        $crawler = new Crawler();
        $crawler->addXmlContent('<html><div class="foo"></div></html>', 'UTF-8');

        $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->addXmlContent() adds nodes from an XML string');
    }
CrawlerTest