function DrupalFlushAllCachesInInstallerTest::installParameters
Returns the parameters that will be used when the test installs Drupal.
Return value
array Array of parameters for use in install_drupal().
Overrides FunctionalTestSetupTrait::installParameters
File
-
core/
tests/ Drupal/ FunctionalTests/ Installer/ DrupalFlushAllCachesInInstallerTest.php, line 92
Class
- DrupalFlushAllCachesInInstallerTest
- Tests drupal_flush_all_caches() and container rebuilds during an install.
Namespace
Drupal\FunctionalTests\InstallerCode
protected function installParameters() : array {
$parameters = parent::installParameters();
// Install Drupal in German so the test can detect when the language
// selected in the installer gets lost in a container rebuild.
$parameters['parameters']['langcode'] = 'de';
// Create an empty po file so we don't attempt to download one from
// localize.drupal.org.
\Drupal::service('file_system')->mkdir($this->publicFilesDirectory . '/translations', NULL, TRUE);
$contents = <<<PO
msgid ""
msgstr ""
PO;
file_put_contents($this->publicFilesDirectory . '/translations/drupal-' . \Drupal::VERSION . '.de.po', $contents);
return $parameters;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.