Skip to content

Commit 1650b01

Browse files
author
vpaladiychuk
committed
MAGETWO-2204: "HEADERS ALREADY SENT" When Controller Action Outputs Directly
1 parent 1188784 commit 1650b01

File tree

1 file changed

+3
-3
lines changed
  • dev/tests/unit/testsuite/Magento/Backup/Controller/Adminhtml/Index

1 file changed

+3
-3
lines changed

dev/tests/unit/testsuite/Magento/Backup/Controller/Adminhtml/Index/DownloadTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class DownloadTest extends \PHPUnit_Framework_TestCase
2323
protected $backup;
2424

2525
/**
26-
* @var \Magento\Framework\App\RequestInterface||\PHPUnit_Framework_MockObject_MockObject
26+
* @var \Magento\Framework\App\RequestInterface|\PHPUnit_Framework_MockObject_MockObject
2727
*/
2828
protected $request;
2929

@@ -120,8 +120,8 @@ public function testExecuteBackupNotFound($time, $exists, $existsCount)
120120
$this->backup->expects($this->once())->method('getTime')->willReturn($time);
121121
$this->backup->expects($this->exactly($existsCount))->method('exists')->willReturn($exists);
122122

123-
$this->request->expects($this->at(0))->method('getParam')->with('time')->will($this->returnValue($time));
124-
$this->request->expects($this->at(1))->method('getParam')->with('type')->will($this->returnValue($type));
123+
$this->request->expects($this->any())->method('getParam')
124+
->will($this->returnValueMap([['time', null, $time], ['type', null, $type]]));
125125

126126
$context = $this->getMock('\Magento\Backend\App\Action\Context', [], [], '', false);
127127
$context->expects($this->once())->method('getRequest')->willReturn($this->request);

0 commit comments

Comments
 (0)