public function getFreshApplicationToServe(DuskServer $server)
    {
        static::$server = $server;

        $this->setUpDuskServer();

        $serializedClosure = static::$server->getStash('tweakApplication');

        if ($serializedClosure) {
            $closure = unserialize($serializedClosure)->getClosure();
            $closure($this->app);
        }

        return $this->app;
    }
public function getFreshApplicationToServe(DuskServer $server)
    {
        static::$server = $server;

        $this->setUpDuskServer();

        $serializedClosure = static::$server->getStash('tweakApplication');

        if ($serializedClosure) {
            $closure = unserialize($serializedClosure)->getClosure();
            $closure($this->app);
        }

        return $this->app;
    }
public function getFreshApplicationToServe ( DuskServer $ server ) { static :: $ server = $ server ; $ this -> setUpDuskServer ( ) ; $ serializedClosure = static :: $ server -> getStash ( 'tweakApplication' ) ; if ( $ serializedClosure ) { $ closure = unserialize ( $ serializedClosure ) -> getClosure ( ) ; $ closure ( $ this -> app ) ; } return $ this -> app ; }
Build up a fresh application to serve, intended for use when we want to
replicate the Application state during a Dusk test when we start our
test server. See the main server file 'server.php'.

@param \Orchestra\Testbench\Dusk\DuskServer $server

@return \Illuminate\Foundation\Application
Build up a fresh application to serve intended for use when we want to replicate the Application state during a Dusk test when we start our test server . See the main server file server . php .