public function restore($version) {
    $fixture = "tests/fixtures/$version.sql";

    if (file_exists("$fixture.bz2")) {
      return $this->collectionBuilder()
        ->addTask(
          $this->taskExec('bunzip2')->arg("$fixture.bz2")->option('keep')->option('force')
        )
        ->addTask(
          $this->taskDrupal('database:restore')->option('file', "../$fixture")
        )
        ->completion(
          $this->taskFilesystemStack()->remove($fixture)
        );
    }
    else {
      $this->say("$version fixture does not exist.");
    }
  }
public function restore($version) {
    $fixture = "tests/fixtures/$version.sql";

    if (file_exists("$fixture.bz2")) {
      return $this->collectionBuilder()
        ->addTask(
          $this->taskExec('bunzip2')->arg("$fixture.bz2")->option('keep')->option('force')
        )
        ->addTask(
          $this->taskDrupal('database:restore')->option('file', "../$fixture")
        )
        ->completion(
          $this->taskFilesystemStack()->remove($fixture)
        );
    }
    else {
      $this->say("$version fixture does not exist.");
    }
  }
public function restore ( $ version ) { $ fixture = "tests/fixtures/$version.sql" ; if ( file_exists ( "$fixture.bz2" ) ) { return $ this -> collectionBuilder ( ) -> addTask ( $ this -> taskExec ( 'bunzip2' ) -> arg ( "$fixture.bz2" ) -> option ( 'keep' ) -> option ( 'force' ) ) -> addTask ( $ this -> taskDrupal ( 'database:restore' ) -> option ( 'file' , "../$fixture" ) ) -> completion ( $ this -> taskFilesystemStack ( ) -> remove ( $ fixture ) ) ; } else { $ this -> say ( "$version fixture does not exist." ) ; } }
Restores a database dump of a previous version of Lightning.

@param string $version
The semantic version from which to restore, e.g. 2.1.7. A dump of this
version must exist in the tests/fixtures directory, named like
$version.sql.bz2.

@return \Robo\Contract\TaskInterface|NULL
The task(s) to run, or NULL if the fixture does not exist.
Restores a database dump of a previous version of Lightning .