Skip to content

Commit

Permalink
Satisfy static and integration tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
hostep committed Sep 25, 2019
1 parent bf36def commit 629fcdf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
use Magento\Catalog\Model\Product;
use Magento\Catalog\Model\Product\Type;

/**
* Provides duplicating bundle options and selections
*/
class Bundle implements \Magento\Catalog\Model\Product\CopyConstructorInterface
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Magento\Catalog\Api\ProductRepositoryInterface;
use Magento\Catalog\Model\Product;
use Magento\Catalog\Model\Product\Type;
use Magento\Framework\App\Request\Http as HttpRequest;
use Magento\Framework\Data\Form\FormKey;
use Magento\Framework\Message\MessageInterface;
use Magento\TestFramework\Helper\Bootstrap;
Expand All @@ -30,6 +31,7 @@ class ProductTest extends AbstractBackendController
public function testDuplicateProduct()
{
$params = $this->getRequestParamsForDuplicate();
$this->getRequest()->setMethod(HttpRequest::METHOD_POST);
$this->getRequest()->setParams(['type' => Type::TYPE_BUNDLE]);
$this->getRequest()->setPostValue($params);
$this->dispatch('backend/catalog/product/save');
Expand All @@ -49,6 +51,7 @@ public function testDuplicateProduct()
* Get necessary request post params for creating and duplicating bundle product.
*
* @return array
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*/
private function getRequestParamsForDuplicate()
{
Expand Down

0 comments on commit 629fcdf

Please sign in to comment.