src/Console/DuskCommand.php
/**
     * Run the given callback with the Dusk configuration files.
     *
     * @param  \Closure  $callback
     * @return void
     */
Run the given callback with the Dusk configuration files.
@param  \Closure  $callback
@return void
Run the given callback with the Dusk configuration files . @param \ Closure $callback @return void
protected function withDuskEnvironment($callback)
    {
        if (file_exists(base_path($this->duskFile()))) {
            $this->backupEnvironment();
        }
        $this->writeConfiguration();
        $callback();
        $this->removeConfiguration();
        if (file_exists(base_path($this->duskFile()))) {
            $this->restoreEnvironment();
        }
    }
protected function withDuskEnvironment ( $ callback ) { if ( file_exists ( base_path ( $ this -> duskFile ( ) ) ) ) { $ this -> backupEnvironment ( ) ; } $ this -> writeConfiguration ( ) ; $ callback ( ) ; $ this -> removeConfiguration ( ) ; if ( file_exists ( base_path ( $ this -> duskFile ( ) ) ) ) { $ this -> restoreEnvironment ( ) ; } }
Run the given callback with the Dusk configuration files.
Run the given callback with the Dusk configuration files .