src/Concerns/MakesHttpRequests.php
public function withMiddleware($middleware = null)
    {
        if (is_null($middleware)) {
            unset($this->app['middleware.disable']);

            return $this;
        }

        foreach ((array) $middleware as $abstract) {
            unset($this->app[$abstract]);
        }

        return $this;
    }
public function withMiddleware($middleware = null)
    {
        if (is_null($middleware)) {
            unset($this->app['middleware.disable']);

            return $this;
        }

        foreach ((array) $middleware as $abstract) {
            unset($this->app[$abstract]);
        }

        return $this;
    }
public function withMiddleware ( $ middleware = null ) { if ( is_null ( $ middleware ) ) { unset ( $ this -> app [ 'middleware.disable' ] ) ; return $ this ; } foreach ( ( array ) $ middleware as $ abstract ) { unset ( $ this -> app [ $ abstract ] ) ; } return $ this ; }
Enable the given middleware for the test.

@param  string|array  $middleware
@return $this
Enable the given middleware for the test .