Skip to content
Snippets Groups Projects
Commit d493a692 authored by git's avatar git Committed by vitalie
Browse files

Issue #3298149 by Project Update Bot: Replace depricated drupal_get_path uses

parent 1dd364cd
No related branches found
No related tags found
No related merge requests found
......@@ -63,7 +63,7 @@ function spamspan_theme($existing, $type, $theme, $path) {
return [
'spamspan_at_sign' => [
'variables' => [
'path' => base_path() . drupal_get_path('module', 'spamspan') . '/image.gif',
'path' => base_path() . \Drupal::service('extension.list.module')->getPath('spamspan') . '/image.gif',
'settings' => [],
],
],
......
......@@ -83,7 +83,7 @@ class FilterSpamspanUnitTest extends KernelTestBase {
$this->spamspanFilterAtDot = $manager->createInstance('filter_spamspan', $configuration);
// Read the test image from the file provided.
$this->base64Image = file_get_contents(drupal_get_path('module', 'spamspan') . '/tests/src/Kernel/base64image.txt');
$this->base64Image = file_get_contents(\Drupal::service('extension.list.module')->getPath('spamspan') . '/tests/src/Kernel/base64image.txt');
}
......@@ -247,10 +247,8 @@ class FilterSpamspanUnitTest extends KernelTestBase {
// Graphical at and [dot].
$emails = [
'user@example.com' => $this->withDom
? '<span class="spamspan"><span class="u">user</span><img class="spamspan-image" alt="at" src="' . base_path() . drupal_get_path('module',
'spamspan') . '/image.gif"><span class="d">example<span class="o"> [dot] </span>com</span></span>'
: '<span class="spamspan"><span class="u">user</span><img class="spamspan-image" alt="at" src="' . base_path() . drupal_get_path('module',
'spamspan') . '/image.gif" /><span class="d">example<span class="o"> [dot] </span>com</span></span>',
? '<span class="spamspan"><span class="u">user</span><img class="spamspan-image" alt="at" src="' . base_path() . \Drupal::service('extension.list.module')->getPath('spamspan') . '/image.gif"><span class="d">example<span class="o"> [dot] </span>com</span></span>'
: '<span class="spamspan"><span class="u">user</span><img class="spamspan-image" alt="at" src="' . base_path() . \Drupal::service('extension.list.module')->getPath('spamspan') . '/image.gif" /><span class="d">example<span class="o"> [dot] </span>com</span></span>',
];
foreach ($emails as $input => $shouldbe) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment