Skip to content

Commit f77cef0

Browse files
ENGCOM-6542: Issue 23521 #26264
2 parents b972b53 + 94eab2d commit f77cef0

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

app/code/Magento/Downloadable/Test/Unit/Helper/DownloadTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
*/
1818
class DownloadTest extends \PHPUnit\Framework\TestCase
1919
{
20+
/** @var array Result of get_headers() function */
21+
public static $headers;
22+
2023
/** @var DownloadHelper */
2124
protected $_helper;
2225

@@ -230,6 +233,7 @@ protected function _setupUrlMocks($size = self::FILE_SIZE, $url = self::URL, $ad
230233
$this->returnValue($this->_handleMock)
231234
);
232235

236+
self::$headers = ['200 OK'];
233237
$this->_helper->setResource($url, DownloadHelper::LINK_TYPE_URL);
234238
}
235239

app/code/Magento/Downloadable/Test/Unit/_files/download_mock.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,13 @@ function mime_content_type()
2222
{
2323
return DownloadTest::$mimeContentType;
2424
}
25+
26+
/**
27+
* Override standard function
28+
*
29+
* @return array
30+
*/
31+
function get_headers()
32+
{
33+
return DownloadTest::$headers;
34+
}

0 commit comments

Comments
 (0)