vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestResponse.php
/**
     * Assert whether the response is redirecting to a given URI.
     *
     * @param  string  $uri
     * @return $this
     */
Assert whether the response is redirecting to a given URI.
@param  string  $uri
@return $this
Assert whether the response is redirecting to a given URI . @param string $uri @return $this
public function assertRedirect($uri = null)
    {
        PHPUnit::assertTrue(
            $this->isRedirect(), 'Response status code ['.$this->getStatusCode().'] is not a redirect status code.'
        );
        if (! is_null($uri)) {
            PHPUnit::assertEquals(app('url')->to($uri), $this->headers->get('Location'));
        }
        return $this;
    }
public function assertRedirect ( $ uri = null ) { PHPUnit :: assertTrue ( $ this -> isRedirect ( ) , 'Response status code [' . $ this -> getStatusCode ( ) . '] is not a redirect status code.' ) ; if ( ! is_null ( $ uri ) ) { PHPUnit :: assertEquals ( app ( 'url' ) -> to ( $ uri ) , $ this -> headers -> get ( 'Location' ) ) ; } return $ this ; }
Assert whether the response is redirecting to a given URI.
Assert whether the response is redirecting to a given URI .