You are here

protected function BrowserTestBase::installParameters in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/simpletest/src/BrowserTestBase.php \Drupal\simpletest\BrowserTestBase::installParameters()

Returns the parameters that will be used when Simpletest installs Drupal.

See also

install_drupal()

install_state_defaults()

1 call to BrowserTestBase::installParameters()
BrowserTestBase::installDrupal in core/modules/simpletest/src/BrowserTestBase.php
Installs Drupal into the Simpletest site.

File

core/modules/simpletest/src/BrowserTestBase.php, line 966
Contains \Drupal\simpletest\BrowserTestBase.

Class

BrowserTestBase
Provides a test case for functional Drupal tests.

Namespace

Drupal\simpletest

Code

protected function installParameters() {
  $connection_info = Database::getConnectionInfo();
  $driver = $connection_info['default']['driver'];
  $connection_info['default']['prefix'] = $connection_info['default']['prefix']['default'];
  unset($connection_info['default']['driver']);
  unset($connection_info['default']['namespace']);
  unset($connection_info['default']['pdo']);
  unset($connection_info['default']['init_commands']);
  $parameters = array(
    'interactive' => FALSE,
    'parameters' => array(
      'profile' => $this->profile,
      'langcode' => 'en',
    ),
    'forms' => array(
      'install_settings_form' => array(
        'driver' => $driver,
        $driver => $connection_info['default'],
      ),
      'install_configure_form' => array(
        'site_name' => 'Drupal',
        'site_mail' => 'simpletest@example.com',
        'account' => array(
          'name' => $this->rootUser->name,
          'mail' => $this->rootUser
            ->getEmail(),
          'pass' => array(
            'pass1' => $this->rootUser->passRaw,
            'pass2' => $this->rootUser->passRaw,
          ),
        ),
        // form_type_checkboxes_value() requires NULL instead of FALSE values
        // for programmatic form submissions to disable a checkbox.
        'update_status_module' => array(
          1 => NULL,
          2 => NULL,
        ),
      ),
    ),
  );
  return $parameters;
}