public function XmlSitemapEnginesFunctionalTest::testPing in XML sitemap 8
Same name and namespace in other branches
- 2.x xmlsitemap_engines/tests/src/Functional/XmlSitemapEnginesFunctionalTest.php \Drupal\Tests\xmlsitemap_engines\Functional\XmlSitemapEnginesFunctionalTest::testPing()
Check if ping works.
File
- xmlsitemap_engines/
tests/ src/ Functional/ XmlSitemapEnginesFunctionalTest.php, line 131
Class
- XmlSitemapEnginesFunctionalTest
- Test xmlsitemap_engines functionality.
Namespace
Drupal\Tests\xmlsitemap_engines\FunctionalCode
public function testPing() {
$edit = [
'engines[simpletest]' => TRUE,
];
$this
->drupalPostForm('admin/config/search/xmlsitemap/engines', $edit, t('Save configuration'));
$this
->assertSession()
->pageTextContains(t('The configuration options have been saved.'));
$this
->submitEngines();
$this
->assertWatchdogMessage([
'type' => 'xmlsitemap',
'message' => 'Submitted the sitemap to %url and received response @code.',
]);
$this
->assertWatchdogMessage([
'type' => 'xmlsitemap',
'message' => 'Received ping for @sitemap.',
]);
}