Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
ba29a0bd
Commit
ba29a0bd
authored
Oct 19, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix request tests.
parent
d5d97762
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
11 deletions
+5
-11
RequestTest.php
tests/Cases/RequestTest.php
+5
-11
No files found.
tests/Cases/RequestTest.php
View file @
ba29a0bd
...
...
@@ -90,19 +90,13 @@ class RequestTest extends PHPUnit_Framework_TestCase {
$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'
;
$this
->
assertEquals
(
'http'
,
Laravel\Request
::
protocol
());
}
public
function
test_protocol_returns_https_when_https
()
{
$_SERVER
[
'HTTPS'
]
=
'on'
;
$this
->
assertEquals
(
'https'
,
Laravel\Request
::
protocol
());
unset
(
$_SERVER
[
'SERVER_PROTOCOL'
]);
$this
->
assertEquals
(
'HTTP/1.1'
,
Laravel\Request
::
protocol
());
}
public
function
test_ajax_method_returns_false_when_not_ajax
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment