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
69e2771b
Commit
69e2771b
authored
Jun 02, 2017
by
chihiro-adachi
Committed by
Fabien Potencier
Jun 02, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix exception hander test
parent
541d590f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
.travis.yml
.travis.yml
+1
-0
tests/Silex/Tests/ExceptionHandlerTest.php
tests/Silex/Tests/ExceptionHandlerTest.php
+3
-3
No files found.
.travis.yml
View file @
69e2771b
...
@@ -38,6 +38,7 @@ matrix:
...
@@ -38,6 +38,7 @@ matrix:
-
php
:
7.0
-
php
:
7.0
-
php
:
7.1
-
php
:
7.1
-
php
:
hhvm
-
php
:
hhvm
dist
:
trusty
cache
:
cache
:
directories
:
directories
:
...
...
tests/Silex/Tests/ExceptionHandlerTest.php
View file @
69e2771b
...
@@ -35,7 +35,7 @@ class ExceptionHandlerTest extends TestCase
...
@@ -35,7 +35,7 @@ class ExceptionHandlerTest extends TestCase
$request
=
Request
::
create
(
'/foo'
);
$request
=
Request
::
create
(
'/foo'
);
$response
=
$app
->
handle
(
$request
);
$response
=
$app
->
handle
(
$request
);
$this
->
assertContains
(
'
<h1>Whoops, looks like something went wrong.</h1>
'
,
$response
->
getContent
());
$this
->
assertContains
(
'
Whoops, looks like something went wrong.
'
,
$response
->
getContent
());
$this
->
assertEquals
(
500
,
$response
->
getStatusCode
());
$this
->
assertEquals
(
500
,
$response
->
getStatusCode
());
}
}
...
@@ -62,7 +62,7 @@ class ExceptionHandlerTest extends TestCase
...
@@ -62,7 +62,7 @@ class ExceptionHandlerTest extends TestCase
$request
=
Request
::
create
(
'/foo'
);
$request
=
Request
::
create
(
'/foo'
);
$response
=
$app
->
handle
(
$request
);
$response
=
$app
->
handle
(
$request
);
$this
->
assertContains
(
'
<h1>Sorry, the page you are looking for could not be found.</h1>
'
,
$response
->
getContent
());
$this
->
assertContains
(
'
Sorry, the page you are looking for could not be found.
'
,
$response
->
getContent
());
$this
->
assertEquals
(
404
,
$response
->
getStatusCode
());
$this
->
assertEquals
(
404
,
$response
->
getStatusCode
());
}
}
...
@@ -86,7 +86,7 @@ class ExceptionHandlerTest extends TestCase
...
@@ -86,7 +86,7 @@ class ExceptionHandlerTest extends TestCase
$request
=
Request
::
create
(
'/foo'
,
'POST'
);
$request
=
Request
::
create
(
'/foo'
,
'POST'
);
$response
=
$app
->
handle
(
$request
);
$response
=
$app
->
handle
(
$request
);
$this
->
assertContains
(
'
<h1>Whoops, looks like something went wrong.</h1>
'
,
$response
->
getContent
());
$this
->
assertContains
(
'
Whoops, looks like something went wrong.
'
,
$response
->
getContent
());
$this
->
assertEquals
(
405
,
$response
->
getStatusCode
());
$this
->
assertEquals
(
405
,
$response
->
getStatusCode
());
$this
->
assertEquals
(
'GET'
,
$response
->
headers
->
get
(
'Allow'
));
$this
->
assertEquals
(
'GET'
,
$response
->
headers
->
get
(
'Allow'
));
}
}
...
...
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