Commit ba29a0bd authored by Taylor Otwell's avatar Taylor Otwell

fix request tests.

parent d5d97762
...@@ -90,19 +90,13 @@ class RequestTest extends PHPUnit_Framework_TestCase { ...@@ -90,19 +90,13 @@ class RequestTest extends PHPUnit_Framework_TestCase {
$this->assertEquals('0.0.0.0', Laravel\Request::ip()); $this->assertEquals('0.0.0.0', Laravel\Request::ip());
} }
public function test_protocol_returns_http_when_not_https() public function test_protocol_returns_server_protocol()
{ {
$this->assertEquals('http', Laravel\Request::protocol()); $_SERVER['SERVER_PROTOCOL'] = 'taylor';
$this->assertEquals('taylor', Laravel\Request::protocol());
$_SERVER['HTTPS'] = 'off'; unset($_SERVER['SERVER_PROTOCOL']);
$this->assertEquals('HTTP/1.1', Laravel\Request::protocol());
$this->assertEquals('http', Laravel\Request::protocol());
}
public function test_protocol_returns_https_when_https()
{
$_SERVER['HTTPS'] = 'on';
$this->assertEquals('https', Laravel\Request::protocol());
} }
public function test_ajax_method_returns_false_when_not_ajax() public function test_ajax_method_returns_false_when_not_ajax()
......
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