Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
aa6b7fb9
Commit
aa6b7fb9
authored
Mar 08, 2011
by
Guillermo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a test for the small fix
parent
0b4d3d5d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
tests/Silex/Tests/RouterTest.php
tests/Silex/Tests/RouterTest.php
+15
-0
No files found.
tests/Silex/Tests/RouterTest.php
View file @
aa6b7fb9
...
...
@@ -142,4 +142,19 @@ class RouterTest extends \PHPUnit_Framework_TestCase
$response
=
$framework
->
handle
(
$request
);
$this
->
assertEquals
(
$expectedContent
,
$response
->
getContent
(),
$message
);
}
public
function
testRequestShouldBeStoredRegardlessOfRouting
()
{
$framework
=
new
Framework
();
$framework
->
get
(
'/foo'
,
function
()
use
(
$framework
)
{
return
new
Response
(
$framework
->
getRequest
()
->
getRequestUri
());
});
$framework
->
error
(
function
(
$e
)
use
(
$framework
)
{
return
new
Response
(
$framework
->
getRequest
()
->
getRequestUri
());
});
foreach
(
array
(
'/foo'
,
'/bar'
)
as
$path
)
{
$request
=
Request
::
create
(
$path
);
$response
=
$framework
->
handle
(
$request
);
$this
->
assertContains
(
$path
,
$response
->
getContent
());
}
}
}
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