class PathTestBase
Same name and namespace in other branches
- 11.x core/modules/path/tests/src/Functional/PathTestBase.php \Drupal\Tests\path\Functional\PathTestBase
- 10 core/modules/path/tests/src/Functional/PathTestBase.php \Drupal\Tests\path\Functional\PathTestBase
- 8.9.x core/modules/path/src/Tests/PathTestBase.php \Drupal\path\Tests\PathTestBase
- 8.9.x 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 uses \Drupal\Core\Test\FunctionalTestSetupTrait, \Drupal\Tests\UiHelperTrait, \Drupal\Core\Test\TestSetupTrait, \Drupal\Tests\block\Traits\BlockCreationTrait, \Drupal\FunctionalTests\AssertLegacyTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\node\Traits\NodeCreationTrait, \Drupal\Tests\node\Traits\ContentTypeCreationTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\user\Traits\UserCreationTrait, \Drupal\Tests\XdebugRequestTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait, \Drupal\Tests\ExtensionListTestTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\Tests\path\Functional\PathTestBase uses \Drupal\Tests\Traits\Core\PathAliasTestTrait extends \Drupal\Tests\BrowserTestBase
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',
];
/**
* {@inheritdoc}
*/
protected function setUp() {
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',
]);
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.