From ed3bea63de6acdbaabb49466d05d39cda5e22b2e Mon Sep 17 00:00:00 2001 From: Kevin Bond Date: Tue, 10 Dec 2013 08:57:30 -0500 Subject: [PATCH] [DomCrawler] added failing test to Crawler --- .../DomCrawler/Tests/CrawlerTest.php | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php b/src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php index aa340637366b7..332f8c3e91406 100644 --- a/src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php +++ b/src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php @@ -696,6 +696,28 @@ public function testBaseTag() $this->assertEquals('https://domain.com/path/link', $crawler->filterXPath('//a')->link()->getUri(), ' tag can set a path'); } + public function testSitemapXml() + { + $crawler = new Crawler(' + + + http://localhost/foo + weekly + 0.5 + 2012-11-16 + + + http://localhost/bar + weekly + 0.5 + 2012-11-16 + + + '); + + $this->assertEquals(2, $crawler->filter('url')->count()); + } + public function createTestCrawler($uri = null) { $dom = new \DOMDocument();