Skip to content

Commit 629fcdf

Browse files
committed
Satisfy static and integration tests.
1 parent bf36def commit 629fcdf

File tree

2 files changed

+6
-0
lines changed
  • app/code/Magento/Bundle/Model/Product/CopyConstructor
  • dev/tests/integration/testsuite/Magento/Bundle/Controller/Adminhtml

2 files changed

+6
-0
lines changed

app/code/Magento/Bundle/Model/Product/CopyConstructor/Bundle.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
use Magento\Catalog\Model\Product;
99
use Magento\Catalog\Model\Product\Type;
1010

11+
/**
12+
* Provides duplicating bundle options and selections
13+
*/
1114
class Bundle implements \Magento\Catalog\Model\Product\CopyConstructorInterface
1215
{
1316
/**

dev/tests/integration/testsuite/Magento/Bundle/Controller/Adminhtml/ProductTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Magento\Catalog\Api\ProductRepositoryInterface;
1111
use Magento\Catalog\Model\Product;
1212
use Magento\Catalog\Model\Product\Type;
13+
use Magento\Framework\App\Request\Http as HttpRequest;
1314
use Magento\Framework\Data\Form\FormKey;
1415
use Magento\Framework\Message\MessageInterface;
1516
use Magento\TestFramework\Helper\Bootstrap;
@@ -30,6 +31,7 @@ class ProductTest extends AbstractBackendController
3031
public function testDuplicateProduct()
3132
{
3233
$params = $this->getRequestParamsForDuplicate();
34+
$this->getRequest()->setMethod(HttpRequest::METHOD_POST);
3335
$this->getRequest()->setParams(['type' => Type::TYPE_BUNDLE]);
3436
$this->getRequest()->setPostValue($params);
3537
$this->dispatch('backend/catalog/product/save');
@@ -49,6 +51,7 @@ public function testDuplicateProduct()
4951
* Get necessary request post params for creating and duplicating bundle product.
5052
*
5153
* @return array
54+
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
5255
*/
5356
private function getRequestParamsForDuplicate()
5457
{

0 commit comments

Comments
 (0)