X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fsystem%2Fsrc%2FTests%2FUpdate%2FUpdatePathTestJavaScriptTest.php;fp=web%2Fcore%2Fmodules%2Fsystem%2Fsrc%2FTests%2FUpdate%2FUpdatePathTestJavaScriptTest.php;h=0000000000000000000000000000000000000000;hp=90f3387a6cdd359f0707158e1884cacaf32e3faf;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/modules/system/src/Tests/Update/UpdatePathTestJavaScriptTest.php b/web/core/modules/system/src/Tests/Update/UpdatePathTestJavaScriptTest.php deleted file mode 100644 index 90f3387a6..000000000 --- a/web/core/modules/system/src/Tests/Update/UpdatePathTestJavaScriptTest.php +++ /dev/null @@ -1,55 +0,0 @@ -databaseDumpFiles = [ - __DIR__ . '/../../../tests/fixtures/update/drupal-8.bare.standard.php.gz', - ]; - } - - /** - * Test JavaScript loading at update.php. - * - * @see ::doPreUpdateTests - */ - public function testJavaScriptLoading() { - $this->runUpdates(); - } - - /** - * {@inheritdoc} - */ - protected function doSelectionTest() { - // Ensure that at least one JS script has drupalSettings in there. - $scripts = $this->xpath('//script'); - $found = FALSE; - foreach ($scripts as $script) { - if (!isset($script['src'])) { - continue; - } - // Source is a root-relative URL. Transform it to an absolute URL to allow - // file_get_contents() to access the file. - $src = preg_replace('#^' . $GLOBALS['base_path'] . '(.*)#i', $GLOBALS['base_url'] . '/' . '${1}', (string) $script['src']); - $file_content = file_get_contents($src); - - if (strpos($file_content, 'window.drupalSettings =') !== FALSE) { - $found = TRUE; - break; - } - } - - $this->assertTrue($found, 'Ensure that the drupalSettingsLoader.js was included in the JS files'); - } - -}