Skip to content

Commit 2f25159

Browse files
author
okarpenko
committed
MAGETWO-33074: Upgrade response class
- fixed static test errors
1 parent 06bc543 commit 2f25159

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

app/code/Magento/Webapi/Controller/Response.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
*/
88
namespace Magento\Webapi\Controller;
99

10-
class Response
11-
extends \Magento\Framework\HTTP\PhpEnvironment\Response
12-
implements \Magento\Framework\App\Response\HttpInterface
10+
class Response extends \Magento\Framework\HTTP\PhpEnvironment\Response implements
11+
\Magento\Framework\App\Response\HttpInterface
1312
{
1413
/**
1514
* Character set which must be used in response.

dev/tests/unit/testsuite/Magento/Framework/HTTP/PhpEnvironment/ResponseTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function testClearHeaderIfHeaderExistsAndWasFound()
110110
{
111111
$response = $this->response = $this->getMock(
112112
'Magento\Framework\HTTP\PhpEnvironment\Response',
113-
['getHeaders', 'send',]
113+
['getHeaders', 'send']
114114
);
115115

116116
$this->headers->addHeaderLine('Header-name: header-value');
@@ -152,7 +152,7 @@ public function testClearHeaderIfHeaderExistsAndWasNotFound()
152152
{
153153
$response = $this->response = $this->getMock(
154154
'Magento\Framework\HTTP\PhpEnvironment\Response',
155-
['getHeaders', 'send',]
155+
['getHeaders', 'send']
156156
);
157157

158158
$this->headers->addHeaderLine('Header-name: header-value');
@@ -193,7 +193,7 @@ public function testClearHeaderAndHeaderNotExists()
193193
{
194194
$response = $this->response = $this->getMock(
195195
'Magento\Framework\HTTP\PhpEnvironment\Response',
196-
['getHeaders', 'send',]
196+
['getHeaders', 'send']
197197
);
198198

199199
$this->headers->addHeaderLine('Header-name: header-value');

lib/internal/Magento/Framework/Oauth/Helper/Request.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,10 @@ protected function _extractQueryStringParams(&$protocolParams, $queryString)
189189
* @param \Magento\Framework\HTTP\PhpEnvironment\Response $response OPTIONAL If NULL - will use internal getter
190190
* @return array
191191
*/
192-
public function prepareErrorResponse(\Exception $exception, \Magento\Framework\HTTP\PhpEnvironment\Response $response = null)
193-
{
192+
public function prepareErrorResponse(
193+
\Exception $exception,
194+
\Magento\Framework\HTTP\PhpEnvironment\Response $response = null
195+
) {
194196
$errorMsg = $exception->getMessage();
195197

196198
if ($exception instanceof \Magento\Framework\Oauth\Exception) {

0 commit comments

Comments
 (0)