Commit f2b9d1e2 authored by Taylor Otwell's avatar Taylor Otwell

added request tests.

parent c1e68717
......@@ -42,7 +42,7 @@ class Request {
{
$uri = $_SERVER['PATH_INFO'];
}
if (isset($_SERVER['REQUEST_URI']))
elseif (isset($_SERVER['REQUEST_URI']))
{
$uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
......
<?php
class RequestTest extends PHPUnit_Framework_TestCase {
public function test_uri_method_returns_path_info_if_set()
{
$_SERVER['PATH_INFO'] = 'something';
$this->assertEquals('something', Laravel\Request::uri());
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment