Example #1
0
         expect($request->method())->toBe('POST');
     });
 });
 describe("->path()", function () {
     it("gets the path", function () {
         $request = new Request(['path' => 'home/index.php']);
         expect($request->path())->toBe('/home/index.php');
     });
     it("sets the path", function () {
         $request = new Request();
         $request->path('/home/index.php');
         expect($request->path())->toBe('/home/index.php');
     });
     it("auto adds a leading slash", function () {
         $request = new Request();
         $request->path('home/index.php');
         expect($request->path())->toBe('/home/index.php');
     });
 });
 describe("->username()", function () {
     it("gets the username", function () {
         $request = new Request(['username' => 'username']);
         expect($request->username())->toBe('username');
     });
     it("sets the username", function () {
         $request = new Request();
         $request->username('username');
         expect($request->username())->toBe('username');
     });
 });
 describe("->password()", function () {