setDatabaseDumpFiles example

class UpdatePathTestBaseFilledTest extends UpdatePathTestBaseTest {

  /** * {@inheritdoc} */
  protected $defaultTheme = 'stark';

  /** * {@inheritdoc} */
  protected function setDatabaseDumpFiles() {
    parent::setDatabaseDumpFiles();
    $this->databaseDumpFiles[0] = __DIR__ . '/../../../../tests/fixtures/update/drupal-9.4.0.filled.standard.php.gz';
  }

  /** * Tests that the content and configuration were properly updated. */
  public function testUpdatedSite() {
    $assert_session = $this->assertSession();

    $this->runUpdates();

    
$request = Request::createFromGlobals();
    $container = $this->initKernel($request);
    $this->initConfig($container);
  }

  /** * {@inheritdoc} */
  protected function doInstall() {
    $this->runDbTasks();
    // Allow classes to set database dump files.     $this->setDatabaseDumpFiles();

    // Load the database(s).     foreach ($this->databaseDumpFiles as $file) {
      if (substr($file, -3) == '.gz') {
        $file = "compress.zlib://$file";
      }
      require $file;
    }
  }

  /** * {@inheritdoc} */
Home | Imprint | This part of the site doesn't use cookies.