protected function ExtensionListTestTrait::getModulePath in Drupal 9
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.
37 calls to ExtensionListTestTrait::getModulePath()
- AggregatorTestBase::getAtomSample in core/
modules/ aggregator/ tests/ src/ Functional/ AggregatorTestBase.php - Returns an example Atom feed.
- AggregatorTestBase::getHtmlEntitiesSample in core/
modules/ aggregator/ tests/ src/ Functional/ AggregatorTestBase.php - Returns an example feed.
- AggregatorTestBase::getRSS091Sample in core/
modules/ aggregator/ tests/ src/ Functional/ AggregatorTestBase.php - Returns an example RSS091 feed.
- CKEditorLoadingTest::testLoading in core/
modules/ ckeditor/ tests/ src/ Functional/ CKEditorLoadingTest.php - Tests loading of CKEditor CSS, JS and JS settings.
- CKEditorPluginManagerTest::testCssFiles in core/
modules/ ckeditor/ tests/ src/ Kernel/ CKEditorPluginManagerTest.php - Tests the iframe instance CSS files of plugins.
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);
}