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
c0c103a6
Commit
c0c103a6
authored
Oct 25, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added uri class tests.
parent
415cb0fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
UriTest.php
tests/Cases/UriTest.php
+32
-0
No files found.
tests/Cases/UriTest.php
0 → 100644
View file @
c0c103a6
<?php
class
UriTest
extends
PHPUnit_Framework_TestCase
{
/**
* @dataProvider uri_provider
*/
public
function
test_get_method_returns_correct_uri
(
$uri
,
$expectation
)
{
$uri
=
new
Laravel\URI
(
array
(
'REQUEST_URI'
=>
$uri
));
$this
->
assertEquals
(
$uri
->
get
(),
$expectation
);
}
public
function
uri_provider
()
{
return
array
(
array
(
'/index.php/'
,
'/'
),
array
(
'/index.php//'
,
'/'
),
array
(
''
,
'/'
),
array
(
'/'
,
'/'
),
array
(
'/index.php/user'
,
'user'
),
array
(
'/index.php/user/something'
,
'user/something'
),
array
(
'/user'
,
'user'
),
array
(
'/user/something'
,
'user/something'
),
array
(
'http://localhost/index.php/user'
,
'user'
),
array
(
'http://localhost/user'
,
'user'
),
array
(
'http://localhost/index.php/'
,
'/'
),
);
}
}
\ No newline at end of file
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