From f2b9d1e2f888720bea171f0e24a2b4a3b3ccc218 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 10 Oct 2011 22:31:59 -0500 Subject: [PATCH] added request tests. --- laravel/request.php | 2 +- tests/Cases/RequestTest.php | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 tests/Cases/RequestTest.php diff --git a/laravel/request.php b/laravel/request.php index 3476537b..2df0ad32 100644 --- a/laravel/request.php +++ b/laravel/request.php @@ -42,7 +42,7 @@ public static function uri() { $uri = $_SERVER['PATH_INFO']; } - if (isset($_SERVER['REQUEST_URI'])) + elseif (isset($_SERVER['REQUEST_URI'])) { $uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); diff --git a/tests/Cases/RequestTest.php b/tests/Cases/RequestTest.php new file mode 100644 index 00000000..69a6f287 --- /dev/null +++ b/tests/Cases/RequestTest.php @@ -0,0 +1,11 @@ +assertEquals('something', Laravel\Request::uri()); + } + +} \ No newline at end of file