You are here

PathUnitTestBase.php in Zircon Profile 8

Same filename and directory in other branches
  1. 8.0 core/modules/system/src/Tests/Path/PathUnitTestBase.php

File

core/modules/system/src/Tests/Path/PathUnitTestBase.php
View source
<?php

/**
 * @file
 * Contains \Drupal\system\Tests\Path\PathUnitTestBase.
 */
namespace Drupal\system\Tests\Path;

use Drupal\simpletest\KernelTestBase;
use Drupal\Core\Database\Database;

/**
 * Base class for Path/URL alias integration tests.
 */
abstract class PathUnitTestBase extends KernelTestBase {

  /**
   * @var \Drupal\system\Tests\Path\UrlAliasFixtures
   */
  protected $fixtures;
  protected function setUp() {
    parent::setUp();
    $this->fixtures = new UrlAliasFixtures();

    // The alias whitelist expects that the menu path roots are set by a
    // menu router rebuild.
    \Drupal::state()
      ->set('router.path_roots', array(
      'user',
      'admin',
    ));
  }
  protected function tearDown() {
    $this->fixtures
      ->dropTables(Database::getConnection());
    parent::tearDown();
  }

}

Classes

Namesort descending Description
PathUnitTestBase Base class for Path/URL alias integration tests.