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
ec53f07e
Commit
ec53f07e
authored
Nov 24, 2014
by
Fabien Potencier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed tests for Symfony 2.6+
parent
288d8911
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
tests/Silex/Tests/ExceptionHandlerTest.php
tests/Silex/Tests/ExceptionHandlerTest.php
+2
-2
tests/Silex/Tests/Provider/SecurityServiceProviderTest.php
tests/Silex/Tests/Provider/SecurityServiceProviderTest.php
+1
-1
No files found.
tests/Silex/Tests/ExceptionHandlerTest.php
View file @
ec53f07e
...
...
@@ -72,7 +72,7 @@ class ExceptionHandlerTest extends \PHPUnit_Framework_TestCase
$request
=
Request
::
create
(
'/foo'
);
$response
=
$app
->
handle
(
$request
);
$this
->
assertContains
(
'No route found for "GET /foo"'
,
$response
->
getContent
(
));
$this
->
assertContains
(
'No route found for "GET /foo"'
,
html_entity_decode
(
$response
->
getContent
()
));
$this
->
assertEquals
(
404
,
$response
->
getStatusCode
());
}
...
...
@@ -99,7 +99,7 @@ class ExceptionHandlerTest extends \PHPUnit_Framework_TestCase
$request
=
Request
::
create
(
'/foo'
,
'POST'
);
$response
=
$app
->
handle
(
$request
);
$this
->
assertContains
(
'No route found for "POST /foo": Method Not Allowed (Allow: GET)'
,
$response
->
getContent
(
));
$this
->
assertContains
(
'No route found for "POST /foo": Method Not Allowed (Allow: GET)'
,
html_entity_decode
(
$response
->
getContent
()
));
$this
->
assertEquals
(
405
,
$response
->
getStatusCode
());
$this
->
assertEquals
(
'GET'
,
$response
->
headers
->
get
(
'Allow'
));
}
...
...
tests/Silex/Tests/Provider/SecurityServiceProviderTest.php
View file @
ec53f07e
...
...
@@ -54,7 +54,7 @@ class SecurityServiceProviderTest extends WebTestCase
$this
->
assertEquals
(
'ANONYMOUS'
,
$client
->
getResponse
()
->
getContent
());
$client
->
request
(
'post'
,
'/login_check'
,
array
(
'_username'
=>
'fabien'
,
'_password'
=>
'bar'
));
$this
->
assert
Equal
s
(
'Bad credentials'
,
$app
[
'security.last_error'
](
$client
->
getRequest
()));
$this
->
assert
Contain
s
(
'Bad credentials'
,
$app
[
'security.last_error'
](
$client
->
getRequest
()));
// hack to re-close the session as the previous assertions re-opens it
$client
->
getRequest
()
->
getSession
()
->
save
();
...
...
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