public function XMLSitemapEnginesFunctionalTest::testSubmitSitemaps in XML sitemap 7.2
Same name and namespace in other branches
- 6.2 xmlsitemap_engines/tests/xmlsitemap_engines.test \XMLSitemapEnginesFunctionalTest::testSubmitSitemaps()
Test Submit Sitemaps.
File
- xmlsitemap_engines/
tests/ xmlsitemap_engines.test, line 81 - Tests for the xmlsitemap_engines module.
Class
- XMLSitemapEnginesFunctionalTest
- Functional Test.
Code
public function testSubmitSitemaps() {
$sitemaps = array();
$sitemap = new stdClass();
$sitemap->uri = array(
'path' => 'http://example.com/sitemap.xml',
'options' => array(),
);
$sitemaps[] = $sitemap;
$sitemap = new stdClass();
$sitemap->uri = array(
'path' => 'http://example.com/sitemap-2.xml',
'options' => array(),
);
$sitemaps[] = $sitemap;
xmlsitemap_engines_submit_sitemaps($this->submit_url, $sitemaps);
$this
->assertWatchdogMessage(array(
'type' => 'xmlsitemap',
'message' => 'Recieved ping for @sitemap.',
'variables' => array(
'@sitemap' => 'http://example.com/sitemap.xml',
),
));
$this
->assertWatchdogMessage(array(
'type' => 'xmlsitemap',
'message' => 'Recieved ping for @sitemap.',
'variables' => array(
'@sitemap' => 'http://example.com/sitemap-2.xml',
),
));
}