diff --git a/tests/modules/file_link_test/src/Controller/RedirectController.php b/tests/modules/file_link_test/src/Controller/RedirectController.php index b07e3fd..353be25 100644 --- a/tests/modules/file_link_test/src/Controller/RedirectController.php +++ b/tests/modules/file_link_test/src/Controller/RedirectController.php @@ -28,7 +28,7 @@ class RedirectController extends ControllerBase { * An absolute URL. */ protected static function getFullUrl($path) { - return Url::fromUri('base:/' . drupal_get_path('module', 'file_link_test') . $path, ['absolute' => TRUE])->toString(); + return Url::fromUri('base:/' . \Drupal::service('extension.list.module')->getPath('file_link_test') . $path, ['absolute' => TRUE])->toString(); } } diff --git a/tests/src/Kernel/FileLinkDeferredTest.php b/tests/src/Kernel/FileLinkDeferredTest.php index 26bb9a8..9e9b293 100644 --- a/tests/src/Kernel/FileLinkDeferredTest.php +++ b/tests/src/Kernel/FileLinkDeferredTest.php @@ -33,7 +33,7 @@ class FileLinkDeferredTest extends KernelTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->installConfig(['file_link_test']); diff --git a/tests/src/Kernel/FileLinkMultiValueTest.php b/tests/src/Kernel/FileLinkMultiValueTest.php index 3635406..38c3c14 100644 --- a/tests/src/Kernel/FileLinkMultiValueTest.php +++ b/tests/src/Kernel/FileLinkMultiValueTest.php @@ -32,7 +32,7 @@ class FileLinkMultiValueTest extends KernelTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->installConfig(['file_link_test']); diff --git a/tests/src/Kernel/FileLinkValidationTest.php b/tests/src/Kernel/FileLinkValidationTest.php index 203f065..1d3f810 100644 --- a/tests/src/Kernel/FileLinkValidationTest.php +++ b/tests/src/Kernel/FileLinkValidationTest.php @@ -38,7 +38,7 @@ class FileLinkValidationTest extends KernelTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->installConfig(['file_link_test']); @@ -95,7 +95,7 @@ class FileLinkValidationTest extends KernelTestBase { * An absolute URL. */ protected static function getFullUrl($path) { - return Url::fromUri('base:/' . drupal_get_path('module', 'file_link_test') . $path, ['absolute' => TRUE, 'query' => ['foo' => 'bar']])->toString(); + return Url::fromUri('base:/' . \Drupal::service('extension.list.module')->getPath('file_link_test') . $path, ['absolute' => TRUE, 'query' => ['foo' => 'bar']])->toString(); } /** diff --git a/tests/src/Kernel/FileLinkWidgetTest.php b/tests/src/Kernel/FileLinkWidgetTest.php index 0b28e7a..edcdf43 100644 --- a/tests/src/Kernel/FileLinkWidgetTest.php +++ b/tests/src/Kernel/FileLinkWidgetTest.php @@ -28,7 +28,7 @@ class FileLinkWidgetTest extends KernelTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->installEntitySchema('entity_test');