core/modules/system/src/Tests/System/ThemeTest.php | 2 +- core/modules/system/src/Tests/Update/UpdatePathTestJavaScriptTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modules/system/src/Tests/System/ThemeTest.php b/core/modules/system/src/Tests/System/ThemeTest.php index 5f81feb..1815679 100644 --- a/core/modules/system/src/Tests/System/ThemeTest.php +++ b/core/modules/system/src/Tests/System/ThemeTest.php @@ -75,7 +75,7 @@ function testThemeSettings() { // Relative path to a public file. $file_relative => array( 'form' => $file_relative, - 'src' => file_create_url($file->uri), + 'src' => $GLOBALS['base_path'] . $file_relative, ), // Relative path to an arbitrary file. 'core/misc/druplicon.png' => array( diff --git a/core/modules/system/src/Tests/Update/UpdatePathTestJavaScriptTest.php b/core/modules/system/src/Tests/Update/UpdatePathTestJavaScriptTest.php index df47e55..faf8119 100644 --- a/core/modules/system/src/Tests/Update/UpdatePathTestJavaScriptTest.php +++ b/core/modules/system/src/Tests/Update/UpdatePathTestJavaScriptTest.php @@ -44,7 +44,7 @@ protected function doSelectionTest() { continue; } $src = (string) $script['src']; - $file_content = file_get_contents(str_replace(base_path(), $GLOBALS['base_url'], $src)); + $file_content = file_get_contents(preg_replace('#^' . base_path() . '(.*)#i', $GLOBALS['base_url'] . '/' . '${1}', $src)); if (strpos($file_content, 'window.drupalSettings =') !== FALSE) { $found = TRUE;