SimpleSitemapViewsTestBase.php 943 Bytes
Newer Older
WalkingDexter's avatar
WalkingDexter committed
1 2 3 4 5
<?php

namespace Drupal\Tests\simple_sitemap_views\Functional;

use Drupal\Tests\simple_sitemap\Functional\SimplesitemapTestBase;
6
use Drupal\views\Views;
WalkingDexter's avatar
WalkingDexter committed
7 8 9 10 11 12 13 14 15

/**
 * Defines a base class for Simple XML Sitemap (Views) functional testing.
 */
abstract class SimpleSitemapViewsTestBase extends SimplesitemapTestBase {

  /**
   * {@inheritdoc}
   */
WalkingDexter's avatar
WalkingDexter committed
16 17 18 19
  public static $modules = [
    'simple_sitemap_views',
    'simple_sitemap_views_test',
  ];
WalkingDexter's avatar
WalkingDexter committed
20 21 22 23 24 25 26 27

  /**
   * Views sitemap data.
   *
   * @var \Drupal\simple_sitemap_views\SimpleSitemapViews
   */
  protected $sitemapViews;

28 29 30 31 32 33 34
  /**
   * Test view.
   *
   * @var \Drupal\views\ViewExecutable
   */
  protected $testView;

WalkingDexter's avatar
WalkingDexter committed
35 36 37 38 39 40 41
  /**
   * {@inheritdoc}
   */
  protected function setUp() {
    parent::setUp();

    $this->sitemapViews = $this->container->get('simple_sitemap.views');
42 43
    $this->testView = Views::getView('simple_sitemap_views_test_view');
    $this->testView->setDisplay('page_1');
WalkingDexter's avatar
WalkingDexter committed
44 45 46
  }

}