Laravel\Lumen\Testing\AssertionsTrait::assertRedirectedTo PHP Method

assertRedirectedTo() public method

Assert whether the client was redirected to a given URI.
public assertRedirectedTo ( string $uri, array $with = [] ) : void
$uri string
$with array
return void
    public function assertRedirectedTo($uri, $with = [])
    {
        PHPUnit::assertInstanceOf('Illuminate\\Http\\RedirectResponse', $this->response);
        PHPUnit::assertEquals($this->app['url']->to($uri), $this->response->headers->get('Location'));
        $this->assertSessionHasAll($with);
    }