Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / tests / Drupal / KernelTests / Core / Path / PathUnitTestBase.php
1 <?php
2
3 namespace Drupal\KernelTests\Core\Path;
4
5 use Drupal\Core\Database\Database;
6 use Drupal\KernelTests\KernelTestBase;
7 use Drupal\system\Tests\Path\UrlAliasFixtures;
8
9 /**
10  * Base class for Path/URL alias integration tests.
11  */
12 abstract class PathUnitTestBase extends KernelTestBase {
13
14   /**
15    * @var \Drupal\system\Tests\Path\UrlAliasFixtures
16    */
17   protected $fixtures;
18
19   protected function setUp() {
20     parent::setUp();
21     $this->fixtures = new UrlAliasFixtures();
22     // The alias whitelist expects that the menu path roots are set by a
23     // menu router rebuild.
24     \Drupal::state()->set('router.path_roots', ['user', 'admin']);
25   }
26
27   protected function tearDown() {
28     $this->fixtures->dropTables(Database::getConnection());
29
30     parent::tearDown();
31   }
32
33 }