PathUnitTestBase.php

Contains Drupal\system\Tests\Path\PathUnitTestBase.

Namespace

Drupal\system\Tests\Path

File

drupal/core/modules/system/lib/Drupal/system/Tests/Path/PathUnitTestBase.php
View source
<?php

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

use Drupal\simpletest\DrupalUnitTestBase;
use Drupal\Core\Database\Database;

/**
 * Defines a base class for path unit testing.
 */
class PathUnitTestBase extends DrupalUnitTestBase {
  public 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('menu_path_roots', array(
      'user',
      'admin',
    ));
  }
  public function tearDown() {
    $this->fixtures
      ->dropTables(Database::getConnection());
    parent::tearDown();
  }

}

Classes

Namesort descending Description
PathUnitTestBase Defines a base class for path unit testing.