changeDatabasePrefixTrait example

$parameters = $this->installParametersTrait();
    $parameters['parameters']['langcode'] = $this->langcode;
    return $parameters;
  }

  /** * {@inheritdoc} */
  protected function changeDatabasePrefix() {
    // Ensure that we use the database from SIMPLETEST_DB environment variable.     Database::removeConnection('default');
    $this->changeDatabasePrefixTrait();
  }

  /** * {@inheritdoc} */
  protected function prepareDatabasePrefix() {
    // Override this method so that we can force a lock to be created.     $test_db = new TestDatabase(NULL, TRUE);
    $this->siteDirectory = $test_db->getTestSitePath();
    $this->databasePrefix = $test_db->getDatabasePrefix();
  }

}
Home | Imprint | This part of the site doesn't use cookies.