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
aa427bbd
Commit
aa427bbd
authored
Jan 18, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added route test for handles method. fixed bug in route class.
parent
f4e1eaf2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
1 deletion
+26
-1
route.php
laravel/routing/route.php
+1
-1
route.test.php
tests/cases/laravel/route.test.php
+25
-0
No files found.
laravel/routing/route.php
View file @
aa427bbd
...
@@ -79,7 +79,7 @@ class Route {
...
@@ -79,7 +79,7 @@ class Route {
*/
*/
protected
static
function
extract
(
$segment
)
protected
static
function
extract
(
$segment
)
{
{
$uri
=
substr
(
$segment
,
strpos
(
$segment
,
' '
)
+
1
);
$uri
=
substr
(
$segment
,
strpos
(
$segment
,
' '
));
return
(
$uri
!==
'/'
)
?
trim
(
$uri
,
'/'
)
:
$uri
;
return
(
$uri
!==
'/'
)
?
trim
(
$uri
,
'/'
)
:
$uri
;
}
}
...
...
tests/cases/laravel/route.test.php
0 → 100644
View file @
aa427bbd
<?php
class
RouteTest
extends
PHPUnit_Framework_TestCase
{
/**
* Destroy the testing environment.
*/
public
function
tearDown
()
{
Request
::
$route
=
null
;
}
/**
* Tests the Route::handles method.
*
* @group laravel
*/
public
function
testHandlesReturnsTrueWhenRouteHandlesTheGivenURI
()
{
$route
=
new
Laravel\Routing\Route
(
'GET /'
,
array
(
'handles'
=>
array
(
'foo/bar'
)));
$this
->
assertTrue
(
$route
->
handles
(
'foo/bar'
));
}
}
\ 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