expect($request->username())->toBe('username'); }); it("sets the username", function () { $request = new Request(); $request->username('username'); expect($request->username())->toBe('username'); }); }); describe("->password()", function () { it("gets the password", function () { $request = new Request(['password' => 'password']); expect($request->password())->toBe('password'); }); it("sets the password", function () { $request = new Request(); $request->password('password'); expect($request->password())->toBe('password'); }); }); describe("->url()", function () { it("gets the url", function () { $request = new Request(['scheme' => 'http', 'host' => 'www.domain.com', 'port' => 80, 'path' => 'index.php']); expect($request->url())->toBe('http://www.domain.com/index.php'); }); it("gets the url with a custom port", function () { $request = new Request(['scheme' => 'http', 'host' => 'www.domain.com', 'port' => 8080, 'path' => 'index.php']); expect($request->url())->toBe('http://www.domain.com:8080/index.php'); }); }); describe("->mode()", function () { it("sets the absolute request mode", function () {