Issue #3207893 by alexpott, Spokje, larowlan, catch: Set system.css_js_query_string during install

merge-requests/600/head
catch 2021-04-26 13:12:57 +01:00
parent 500ba2d9ff
commit 9db502ce09
3 changed files with 4 additions and 4 deletions

View File

@ -1313,6 +1313,9 @@ function system_install() {
$site->set('name', 'Drupal'); $site->set('name', 'Drupal');
} }
$site->save(TRUE); $site->save(TRUE);
// Populate the dummy query string added to all CSS and JavaScript files.
_drupal_flush_css_js();
} }
/** /**

View File

@ -21,6 +21,7 @@ class InstallerTest extends InstallerTestBase {
* Ensures that the user page is available after installation. * Ensures that the user page is available after installation.
*/ */
public function testInstaller() { public function testInstaller() {
$this->assertNotNull(\Drupal::state()->get('system.css_js_query_string'), 'The dummy query string should be set during install');
$this->assertSession()->addressEquals('user/1'); $this->assertSession()->addressEquals('user/1');
$this->assertSession()->statusCodeEquals(200); $this->assertSession()->statusCodeEquals(200);
// Confirm that we are logged-in after installation. // Confirm that we are logged-in after installation.

View File

@ -566,10 +566,6 @@ abstract class BrowserTestBase extends TestCase {
// as expected. // as expected.
$this->container->get('cache_tags.invalidator')->resetChecksums(); $this->container->get('cache_tags.invalidator')->resetChecksums();
// Set the dummy query string added to all CSS and JavaScript files.
// @todo Remove in https://www.drupal.org/project/drupal/issues/3207893.
_drupal_flush_css_js();
// Generate a route to prime the url generator with the correct base url. // Generate a route to prime the url generator with the correct base url.
// @todo Remove in https://www.drupal.org/project/drupal/issues/3207896. // @todo Remove in https://www.drupal.org/project/drupal/issues/3207896.
Url::fromRoute('<front>')->setAbsolute()->toString(); Url::fromRoute('<front>')->setAbsolute()->toString();