You are here

abstract class PathTestBase in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/path/tests/src/Functional/PathTestBase.php \Drupal\Tests\path\Functional\PathTestBase
  2. 9 core/modules/path/tests/src/Functional/PathTestBase.php \Drupal\Tests\path\Functional\PathTestBase

Provides a base class for testing the Path module.

Hierarchy

Expanded class hierarchy of PathTestBase

File

core/modules/path/tests/src/Functional/PathTestBase.php, line 11

Namespace

Drupal\Tests\path\Functional
View source
abstract class PathTestBase extends BrowserTestBase {
  use PathAliasTestTrait;

  /**
   * Modules to enable.
   *
   * @var array
   */
  protected static $modules = [
    'node',
    'path',
  ];
  protected function setUp() : void {
    parent::setUp();

    // Create Basic page and Article node types.
    if ($this->profile != 'standard') {
      $this
        ->drupalCreateContentType([
        'type' => 'page',
        'name' => 'Basic page',
      ]);
      $this
        ->drupalCreateContentType([
        'type' => 'article',
        'name' => 'Article',
      ]);
    }
  }

}

Members