Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 23521 #26264

Merged
merged 3 commits into from
Jan 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
*/
class DownloadTest extends \PHPUnit\Framework\TestCase
{
/** @var array Result of get_headers() function */
public static $headers;

/** @var DownloadHelper */
protected $_helper;

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

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

Expand Down
10 changes: 10 additions & 0 deletions app/code/Magento/Downloadable/Test/Unit/_files/download_mock.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,13 @@ function mime_content_type()
{
return DownloadTest::$mimeContentType;
}

/**
* Override standard function
*
* @return array
*/
function get_headers()
{
return DownloadTest::$headers;
}