Skip to content

Commit

Permalink
Add tests to interact with request information.
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Oct 9, 2019
1 parent ef90525 commit 2d52d9a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/RequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@

class RequestTest extends TestCase
{
/** @test */
public function it_can_get_request_information()
{
$this->app['router']->get('hello', ['uses' => function () {
return 'hello world';
}]);

$this->call('GET', 'hello?foo=bar');

$this->assertSame('http://localhost/hello?foo=bar', url()->full());
$this->assertSame('http://localhost/hello', url()->current());
$this->assertSame(['foo' => 'bar'], request()->all());
}

/** @test */
public function it_flashes_request_values()
{
Expand Down

0 comments on commit 2d52d9a

Please sign in to comment.