Skip to content

Commit 7677eb6

Browse files
committed
Merge branch 'ACP2E-3431' of https://github.com/adobe-commerce-tier-4/magento2ce into PR-11-19-2024
2 parents c7cb69e + 563e27a commit 7677eb6

File tree

4 files changed

+52
-10
lines changed

4 files changed

+52
-10
lines changed

app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportSoldCsv.php

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
<?php
22
/**
3-
*
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
3+
* Copyright 2011 Adobe
4+
* All Rights Reserved.
65
*/
76
declare(strict_types=1);
87

98
namespace Magento\Reports\Controller\Adminhtml\Report\Product;
109

1110
use Magento\Backend\Block\Widget\Grid\ExportInterface;
12-
use Magento\Framework\App\Action\HttpPostActionInterface;
11+
use Magento\Framework\App\Action\HttpGetActionInterface;
1312
use Magento\Framework\App\ResponseInterface;
1413
use Magento\Framework\App\Filesystem\DirectoryList;
1514
use Magento\Reports\Controller\Adminhtml\Report\Product;
1615

17-
class ExportSoldCsv extends Product implements HttpPostActionInterface
16+
class ExportSoldCsv extends Product implements HttpGetActionInterface
1817
{
1918
/**
2019
* Authorization level of a basic admin session

app/code/Magento/Reports/Controller/Adminhtml/Report/Product/ExportSoldExcel.php

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
<?php
22
/**
3-
*
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
3+
* Copyright 2011 Adobe
4+
* All Rights Reserved.
65
*/
76
declare(strict_types=1);
87

98
namespace Magento\Reports\Controller\Adminhtml\Report\Product;
109

1110
use Magento\Backend\Block\Widget\Grid\ExportInterface;
12-
use Magento\Framework\App\Action\HttpPostActionInterface;
11+
use Magento\Framework\App\Action\HttpGetActionInterface;
1312
use Magento\Framework\App\ResponseInterface;
1413
use Magento\Framework\App\Filesystem\DirectoryList;
1514
use Magento\Reports\Controller\Adminhtml\Report\Product;
1615

17-
class ExportSoldExcel extends Product implements HttpPostActionInterface
16+
class ExportSoldExcel extends Product implements HttpGetActionInterface
1817
{
1918
/**
2019
* Authorization level of a basic admin session
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
/**
3+
* Copyright 2024 Adobe
4+
* All Rights Reserved.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\Reports\Test\Integration\Controller\Adminhtml\Report\Product;
9+
10+
use Magento\TestFramework\TestCase\AbstractBackendController;
11+
12+
/**
13+
* @magentoAppArea adminhtml
14+
*/
15+
class ExportSoldCsvTest extends AbstractBackendController
16+
{
17+
public function testExecute() : void
18+
{
19+
$this->dispatch('backend/reports/report_product/exportSoldCsv');
20+
$this->assertEquals(302, $this->getResponse()->getHttpResponseCode());
21+
}
22+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
/**
3+
* Copyright 2024 Adobe
4+
* All Rights Reserved.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\Reports\Test\Integration\Controller\Adminhtml\Report\Product;
9+
10+
use Magento\TestFramework\TestCase\AbstractBackendController;
11+
12+
/**
13+
* @magentoAppArea adminhtml
14+
*/
15+
class ExportSoldExcelTest extends AbstractBackendController
16+
{
17+
public function testExecute() : void
18+
{
19+
$this->dispatch('backend/reports/report_product/exportSoldExcel');
20+
$this->assertEquals(302, $this->getResponse()->getHttpResponseCode());
21+
}
22+
}

0 commit comments

Comments
 (0)