Skip to content

Commit 787da0a

Browse files
Indrani sonawaneIndrani sonawane
authored andcommitted
Fixed static test failures
1 parent 37247d0 commit 787da0a

File tree

4 files changed

+26
-155
lines changed

4 files changed

+26
-155
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Type extends \Magento\Catalog\Model\Product\Type\AbstractType
3131
/**
3232
* Product type
3333
*/
34-
const TYPE_CODE = 'bundle';
34+
public const TYPE_CODE = 'bundle';
3535

3636
/**
3737
* Product is composite
@@ -52,6 +52,7 @@ class Type extends \Magento\Catalog\Model\Product\Type\AbstractType
5252
*
5353
* @var string
5454
* @deprecated 100.2.0
55+
* @see MAGETWO-71174
5556
*/
5657
protected $_keySelectionsCollection = '_cache_instance_selections_collection';
5758

@@ -91,14 +92,14 @@ class Type extends \Magento\Catalog\Model\Product\Type\AbstractType
9192
protected $_canConfigure = true;
9293

9394
/**
94-
* Catalog data
95+
* Catalog data helper
9596
*
9697
* @var \Magento\Catalog\Helper\Data
9798
*/
9899
protected $_catalogData = null;
99100

100101
/**
101-
* Catalog product
102+
* Catalog product helper
102103
*
103104
* @var \Magento\Catalog\Helper\Product
104105
*/

dev/tests/api-functional/testsuite/Magento/GraphQl/Bundle/AddBundleProductToCartTest.php

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,17 @@
77

88
namespace Magento\GraphQl\Bundle;
99

10+
use Magento\Bundle\Test\Fixture\Link as BundleSelectionFixture;
11+
use Magento\Bundle\Test\Fixture\Option as BundleOptionFixture;
12+
use Magento\Bundle\Test\Fixture\Product as BundleProductFixture;
1013
use Magento\Catalog\Api\ProductRepositoryInterface;
14+
use Magento\Catalog\Test\Fixture\Product as ProductFixture;
1115
use Magento\TestFramework\TestCase\GraphQlAbstract;
1216
use Magento\TestFramework\Helper\Bootstrap;
1317
use Magento\Quote\Model\Quote;
1418
use Magento\Quote\Model\QuoteIdToMaskedQuoteIdInterface;
1519
use Magento\Quote\Model\ResourceModel\Quote as QuoteResource;
20+
use Magento\TestFramework\Fixture\DataFixture;
1621

1722
/**
1823
* Test adding bundled products to cart
@@ -378,9 +383,25 @@ public function testAddBundleToCartWithRadioAndSelectErr()
378383
}
379384

380385
/**
381-
* @magentoApiDataFixture Magento/Bundle/_files/product_with_multiple_options_multiselect_checkbox.php
382386
* @magentoApiDataFixture Magento/Checkout/_files/active_quote.php
383387
*/
388+
#[
389+
DataFixture(ProductFixture::class, ['sku' => 'simple-1', 'price' => 10], 'p1'),
390+
DataFixture(ProductFixture::class, ['sku' => 'simple2', 'price' => 20], 'p2'),
391+
DataFixture(BundleSelectionFixture::class, ['sku' => '$p1.sku$', 'price' => 10, 'price_type' => 0,
392+
'title' => 'Checkbox Options','default_title' => 'Checkbox Options', 'type' => 'checkbox',
393+
'required' => 1, 'delete' => ''], 'link1'),
394+
DataFixture(BundleSelectionFixture::class, ['sku' => '$p2.sku$', 'price' => 25, 'price_type' => 1,
395+
'title' => 'Multiselect Options','default_title' => 'Multiselect Options', 'type' => 'multi',
396+
'required' => 1, 'delete' => ''], 'link2'),
397+
DataFixture(BundleOptionFixture::class, ['product_links' => ['$link1$', '$link2$']], 'opt1'),
398+
DataFixture(
399+
BundleProductFixture::class,
400+
['sku' => 'bundle-product-multiselect-checkbox-options','price' => 50,'price_type' => 1,
401+
'_options' => ['$opt1$']],
402+
'bundle-product-multiselect-checkbox-options'
403+
),
404+
]
384405
public function testAddBundleToCartWithEmptyMultiselectOptionValue()
385406
{
386407
$this->expectException(\Exception::class);

dev/tests/integration/testsuite/Magento/Bundle/_files/product_with_multiple_options_multiselect_checkbox.php

Lines changed: 0 additions & 116 deletions
This file was deleted.

dev/tests/integration/testsuite/Magento/Bundle/_files/product_with_multiple_options_multiselect_checkbox_rollback.php

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)