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 Original file line number Diff line number Diff line change 8
8
use Magento \Catalog \Model \Product ;
9
9
use Magento \Catalog \Model \Product \Type ;
10
10
11
+ /**
12
+ * Provides duplicating bundle options and selections
13
+ */
11
14
class Bundle implements \Magento \Catalog \Model \Product \CopyConstructorInterface
12
15
{
13
16
/**
Original file line number Diff line number Diff line change 10
10
use Magento \Catalog \Api \ProductRepositoryInterface ;
11
11
use Magento \Catalog \Model \Product ;
12
12
use Magento \Catalog \Model \Product \Type ;
13
+ use Magento \Framework \App \Request \Http as HttpRequest ;
13
14
use Magento \Framework \Data \Form \FormKey ;
14
15
use Magento \Framework \Message \MessageInterface ;
15
16
use Magento \TestFramework \Helper \Bootstrap ;
@@ -30,6 +31,7 @@ class ProductTest extends AbstractBackendController
30
31
public function testDuplicateProduct ()
31
32
{
32
33
$ params = $ this ->getRequestParamsForDuplicate ();
34
+ $ this ->getRequest ()->setMethod (HttpRequest::METHOD_POST );
33
35
$ this ->getRequest ()->setParams (['type ' => Type::TYPE_BUNDLE ]);
34
36
$ this ->getRequest ()->setPostValue ($ params );
35
37
$ this ->dispatch ('backend/catalog/product/save ' );
@@ -49,6 +51,7 @@ public function testDuplicateProduct()
49
51
* Get necessary request post params for creating and duplicating bundle product.
50
52
*
51
53
* @return array
54
+ * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
52
55
*/
53
56
private function getRequestParamsForDuplicate ()
54
57
{
You can’t perform that action at this time.
0 commit comments