You are here

protected function XmlSitemapTestBase::assertXMLSitemapProblems in XML sitemap 2.x

Same name and namespace in other branches
  1. 8 tests/src/Functional/XmlSitemapTestBase.php \Drupal\Tests\xmlsitemap\Functional\XmlSitemapTestBase::assertXMLSitemapProblems()

Assert XML Sitemap Problems.

@codingStandardsIgnoreStart

1 call to XmlSitemapTestBase::assertXMLSitemapProblems()
XmlSitemapFunctionalTest::testStatusReport in tests/src/Functional/XmlSitemapFunctionalTest.php
Test Status Report.

File

tests/src/Functional/XmlSitemapTestBase.php, line 371

Class

XmlSitemapTestBase
Helper test class with some added functions for testing.

Namespace

Drupal\Tests\xmlsitemap\Functional

Code

protected function assertXMLSitemapProblems($problem_text = FALSE) {

  // @codingStandardsIgnoreEnd
  $this
    ->drupalGet('admin/config/search/xmlsitemap');
  $this
    ->assertSession()
    ->pageTextContains('One or more problems were detected with your XML sitemap configuration');
  if ($problem_text) {
    $this
      ->clickLink('status report');
    $this
      ->assertSession()
      ->pageTextContains($problem_text);
  }
}