Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
5ce32930
Commit
5ce32930
authored
Sep 08, 2017
by
xjm
Browse files
Issue
#2905181
by tedbow: Remove useless if statement in ResourceTestBase::assertResourceResponse()
parent
7b4861f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/modules/rest/tests/src/Functional/ResourceTestBase.php
View file @
5ce32930
...
...
@@ -351,12 +351,7 @@ protected function request($method, Url $url, array $request_options) {
*/
protected
function
assertResourceResponse
(
$expected_status_code
,
$expected_body
,
ResponseInterface
$response
)
{
$this
->
assertSame
(
$expected_status_code
,
$response
->
getStatusCode
());
if
(
$expected_status_code
<
400
)
{
$this
->
assertSame
([
static
::
$mimeType
],
$response
->
getHeader
(
'Content-Type'
));
}
else
{
$this
->
assertSame
([
static
::
$mimeType
],
$response
->
getHeader
(
'Content-Type'
));
}
$this
->
assertSame
([
static
::
$mimeType
],
$response
->
getHeader
(
'Content-Type'
));
if
(
$expected_body
!==
FALSE
)
{
$this
->
assertSame
(
$expected_body
,
(
string
)
$response
->
getBody
());
}
...
...
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