Skip to content

Commit

Permalink
Merge branch '5.6' of https://github.com/gsingh1/framework into gsing…
Browse files Browse the repository at this point in the history
…h1-5.6
  • Loading branch information
taylorotwell committed May 21, 2018
2 parents 89b2f7b + 378ca9d commit 6911659
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions src/Illuminate/Foundation/Testing/TestResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,27 @@ public function assertRedirect($uri = null)
);

if (! is_null($uri)) {
PHPUnit::assertEquals(
app('url')->to($uri), app('url')->to($this->headers->get('Location'))
);
$this->assertUri($uri);
}

return $this;
}

/**
* Assert whether the response location is to a given URI.
*
* @param string $uri
* @return $this
*/
public function assertUri($uri)
{
PHPUnit::assertEquals(
app('url')->to($uri), app('url')->to($this->headers->get('Location'))
);

return $this;
}

/**
* Asserts that the response contains the given header and equals the optional value.
*
Expand Down

0 comments on commit 6911659

Please sign in to comment.