function ExtensionListTestTrait::getModulePath
Same name and namespace in other branches
- 10 core/tests/Drupal/Tests/ExtensionListTestTrait.php \Drupal\Tests\ExtensionListTestTrait::getModulePath()
- 11.x core/tests/Drupal/Tests/ExtensionListTestTrait.php \Drupal\Tests\ExtensionListTestTrait::getModulePath()
Gets the path for the specified module.
Parameters
string $module_name: The module name.
Return value
string The Drupal-root relative path to the module directory.
Throws
\Drupal\Core\Extension\Exception\UnknownExtensionException If the module does not exist.
12 calls to ExtensionListTestTrait::getModulePath()
- ConfigInstallProfileOverrideTest::testInstallProfileConfigOverwrite in core/
modules/ config/ tests/ src/ Functional/ ConfigInstallProfileOverrideTest.php - Tests install profile config changes.
- DbLogTest::testBacktrace in core/
modules/ dblog/ tests/ src/ Functional/ DbLogTest.php - Tests that the details page displays correctly backtrace.
- EntityTypeWithoutViewsDataTest::testEntityTypeWithoutViewsData in core/
modules/ datetime_range/ tests/ src/ Kernel/ Views/ EntityTypeWithoutViewsDataTest.php - Tests the case when an entity type provides no views data.
- ErrorHandlerTest::testErrorHandler in core/
modules/ system/ tests/ src/ Functional/ System/ ErrorHandlerTest.php - Tests the error handler.
- ErrorHandlerTest::testExceptionHandler in core/
modules/ system/ tests/ src/ Functional/ System/ ErrorHandlerTest.php - Tests the exception handler.
File
-
core/
tests/ Drupal/ Tests/ ExtensionListTestTrait.php, line 22
Class
- ExtensionListTestTrait
- Provides extension list methods.
Namespace
Drupal\TestsCode
protected function getModulePath(string $module_name) : string {
return \Drupal::service('extension.list.module')->getPath($module_name);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.