abstract class PathTestBase in Drupal 10
Same name and namespace in other branches
- 8 core/modules/path/tests/src/Functional/PathTestBase.php \Drupal\Tests\path\Functional\PathTestBase
- 9 core/modules/path/tests/src/Functional/PathTestBase.php \Drupal\Tests\path\Functional\PathTestBase
Provides a base class for testing the Path module.
Hierarchy
- class \Drupal\Tests\BrowserTestBase extends \PHPUnit\Framework\TestCase uses \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait, FunctionalTestSetupTrait, TestSetupTrait, BlockCreationTrait, ConfigTestTrait, ExtensionListTestTrait, ContentTypeCreationTrait, NodeCreationTrait, RandomGeneratorTrait, TestRequirementsTrait, PhpUnitWarnings, UiHelperTrait, UserCreationTrait, XdebugRequestTrait
- class \Drupal\Tests\path\Functional\PathTestBase uses PathAliasTestTrait
Expanded class hierarchy of PathTestBase
File
- core/
modules/ path/ tests/ src/ Functional/ PathTestBase.php, line 11
Namespace
Drupal\Tests\path\FunctionalView 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',
]);
}
}
}