Commit 50567261 authored by gbyte.co's avatar gbyte.co

Fix test to use the nobatch sitemap generation

parent fe0d8394
......@@ -19,12 +19,10 @@ class Batch {
private $batch;
private $batchInfo;
const PLUGIN_ERROR_MESSAGE = "The simple_sitemap @plugin plugin has been omitted, as it does not return the required numeric array of path data sets. Each data sets must contain the required path element (relative path string or Drupal\\Core\\Url object) and optionally other elements, like lastmod.";
const PATH_DOES_NOT_EXIST = "The path @faulty_path has been omitted from the XML sitemap, as it does not exist.";
const PATH_DOES_NOT_EXIST_OR_NO_ACCESS = "The path @faulty_path has been omitted from the XML sitemap as it either does not exist, or it is not accessible to anonymous users.";
const ANONYMOUS_USER_ID = 0;
function __construct($from = 'form') {
$this->batch = array(
'title' => t('Generating XML sitemap'),
......
......@@ -40,7 +40,7 @@ class SimplesitemapTest extends WebTestBase {
* Test Simple sitemap integration.
*/
public function testSimplesitemap() {
\Drupal::service('simple_sitemap.generator')->generateSitemap('backend');
\Drupal::service('simple_sitemap.generator')->generateSitemap('nobatch');
// Verify sitemap.xml can be cached.
$this->drupalGet('sitemap.xml');
......@@ -52,7 +52,7 @@ class SimplesitemapTest extends WebTestBase {
$node = $this->createNode(['title' => 'A new page', 'type' => 'page']);
// Generate new sitemap.
\Drupal::service('simple_sitemap.generator')->generateSitemap('backend');
\Drupal::service('simple_sitemap.generator')->generateSitemap('nobatch');
// Verify the cache was flushed and node is in the sitemap.
$this->drupalGet('sitemap.xml');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment