Skip to content

Commit b00d9e6

Browse files
committed
Github #99: Sync "develop-storefront" with master branches
1 parent 5c3c2f5 commit b00d9e6

10 files changed

+0
-112
lines changed

dev/tests/integration/testsuite/Magento/Catalog/_files/configurable_products_with_custom_attribute_layered_navigation.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,3 @@
3131
$attributeRepository->save($attribute);
3232

3333
CacheCleaner::cleanAll();
34-
35-
// Run from CLI due to some classes involved in reindex process have state which do not allow to reindex
36-
$appDir = dirname(Bootstrap::getInstance()->getAppTempDir());
37-
$out = '';
38-
// phpcs:ignore Magento2.Security.InsecureFunction
39-
exec("php -f {$appDir}/bin/magento indexer:reindex catalogsearch_fulltext", $out);

dev/tests/integration/testsuite/Magento/Catalog/_files/product_simple.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -207,16 +207,3 @@
207207
$product->getSku(),
208208
[2]
209209
);
210-
211-
/**
212-
* We need to remember that automatic reindexation is not working properly in integration tests
213-
* Reindexation is sitting on top of afterCommit callbacks:
214-
* \Magento\Catalog\Model\Product::priceReindexCallback
215-
*
216-
* However, callbacks are applied only when transaction_level = 0 (when transaction is commited), however
217-
* integration tests are not committing transactions, so we need to reindex data manually in order to reuse it in tests
218-
*/
219-
/** @var \Magento\Indexer\Model\Indexer $indexer */
220-
$indexer = $objectManager->create(\Magento\Indexer\Model\Indexer::class);
221-
$indexer->load('catalog_product_price');
222-
$indexer->reindexRow($product->getId());

dev/tests/integration/testsuite/Magento/Catalog/_files/product_simple_disabled.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -207,16 +207,3 @@
207207
$product->getSku(),
208208
[2]
209209
);
210-
211-
/**
212-
* We need to remember that automatic reindexation is not working properly in integration tests
213-
* Reindexation is sitting on top of afterCommit callbacks:
214-
* \Magento\Catalog\Model\Product::priceReindexCallback
215-
*
216-
* However, callbacks are applied only when transaction_level = 0 (when transaction is commited), however
217-
* integration tests are not committing transactions, so we need to reindex data manually in order to reuse it in tests
218-
*/
219-
/** @var \Magento\Indexer\Model\Indexer $indexer */
220-
$indexer = $objectManager->create(\Magento\Indexer\Model\Indexer::class);
221-
$indexer->load('catalog_product_price');
222-
$indexer->reindexRow($product->getId());

dev/tests/integration/testsuite/Magento/Catalog/_files/products_with_layered_navigation_custom_attribute.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,3 @@
149149
}
150150
}
151151
CacheCleaner::cleanAll();
152-
153-
// Run from CLI due to some classes involved in reindex process have state which do not allow to reindex
154-
$appDir = dirname(Bootstrap::getInstance()->getAppTempDir());
155-
$out = '';
156-
// phpcs:ignore Magento2.Security.InsecureFunction
157-
exec("php -f {$appDir}/bin/magento indexer:reindex catalogsearch_fulltext", $out);

dev/tests/integration/testsuite/Magento/Catalog/_files/products_with_layered_navigation_with_multiselect_attribute.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,3 @@
9292
$productRepository->save($product);
9393

9494
CacheCleaner::cleanAll();
95-
96-
// Run from CLI due to some classes involved in reindex process have state which do not allow to reindex
97-
$appDir = dirname(Bootstrap::getInstance()->getAppTempDir());
98-
$out = '';
99-
// phpcs:ignore Magento2.Security.InsecureFunction
100-
exec("php -f {$appDir}/bin/magento indexer:reindex catalogsearch_fulltext", $out);

dev/tests/integration/testsuite/Magento/ConfigurableProduct/_files/product_configurable.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -143,17 +143,3 @@
143143
$product->getSku(),
144144
[2]
145145
);
146-
147-
/**
148-
* We need to remember that automatic reindexation is not working properly in integration tests
149-
* Reindexation is sitting on top of afterCommit callbacks:
150-
* \Magento\Catalog\Model\Product::priceReindexCallback
151-
*
152-
* However, callbacks are applied only when transaction_level = 0 (when transaction is commited), however
153-
* integration tests are not committing transactions, so we need to reindex data manually in order to reuse it in tests
154-
*/
155-
/** @var \Magento\Indexer\Model\Indexer $indexer */
156-
$indexer = Bootstrap::getObjectManager()->create(\Magento\Indexer\Model\Indexer::class);
157-
$indexer->load('catalog_product_price');
158-
$indexer->reindexRow($product->getId());
159-
$indexer->reindexList($idsToReindex);

dev/tests/integration/testsuite/Magento/ConfigurableProduct/_files/product_configurable_sku.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
$attributeValues = [];
3737
$attributeSetId = $installer->getAttributeSetId('catalog_product', 'Default');
3838
$associatedProductIds = [];
39-
$idsToReindex = $productIds = [10, 20];
4039
array_shift($options); //remove the first option which is empty
4140

4241
foreach ($options as $option) {
@@ -142,16 +141,3 @@
142141
$product->getSku(),
143142
[2]
144143
);
145-
146-
/**
147-
* We need to remember that automatic reindexation is not working properly in integration tests
148-
* Reindexation is sitting on top of afterCommit callbacks:
149-
* \Magento\Catalog\Model\Product::priceReindexCallback
150-
*
151-
* However, callbacks are applied only when transaction_level = 0 (when transaction is commited), however
152-
* integration tests are not committing transactions, so we need to reindex data manually in order to reuse it in tests
153-
*/
154-
/** @var \Magento\Indexer\Model\Indexer $indexer */
155-
$indexer = Bootstrap::getObjectManager()->create(\Magento\Indexer\Model\Indexer::class);
156-
$indexer->load('catalog_product_price');
157-
$indexer->reindexList($idsToReindex);

dev/tests/integration/testsuite/Magento/Wishlist/_files/two_wishlists_for_two_diff_customers.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,3 @@
3131
$wishlistForSecondCustomer->loadByCustomerId($secondCustomerIdFromFixture, true);
3232
$item = $wishlistForSecondCustomer->addNewItem($product, new \Magento\Framework\DataObject([]));
3333
$wishlistForSecondCustomer->save();
34-
35-
/**
36-
* We need to remember that automatic reindexation is not working properly in integration tests
37-
* Reindexation is sitting on top of afterCommit callbacks:
38-
* \Magento\Catalog\Model\Product::priceReindexCallback
39-
*
40-
* However, callbacks are applied only when transaction_level = 0 (when transaction is commited), however
41-
* integration tests are not committing transactions, so we need to reindex data manually in order to reuse it in tests
42-
*/
43-
/** @var \Magento\Indexer\Model\Indexer $indexer */
44-
$indexer = Bootstrap::getObjectManager()->create(\Magento\Indexer\Model\Indexer::class);
45-
$indexer->load('catalog_product_price');
46-
$indexer->reindexList([$product->getId()]);

dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,3 @@
2525
$wishlist->loadByCustomerId($customer->getId(), true);
2626
$item = $wishlist->addNewItem($product, new DataObject([]));
2727
$wishlist->setSharingCode('fixture_unique_code')->save();
28-
29-
/**
30-
* We need to remember that automatic reindexation is not working properly in integration tests
31-
* Reindexation is sitting on top of afterCommit callbacks:
32-
* \Magento\Catalog\Model\Product::priceReindexCallback
33-
*
34-
* However, callbacks are applied only when transaction_level = 0 (when transaction is commited), however
35-
* integration tests are not committing transactions, so we need to reindex data manually in order to reuse it in tests
36-
*/
37-
/** @var \Magento\Indexer\Model\Indexer $indexer */
38-
$indexer = Bootstrap::getObjectManager()->create(\Magento\Indexer\Model\Indexer::class);
39-
$indexer->load('catalog_product_price');
40-
$indexer->reindexList([$product->getId()]);

dev/tests/integration/testsuite/Magento/Wishlist/_files/wishlist_with_disabled_simple_product.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,3 @@
1616
$product = $productRepository->get($productSku);
1717
$product->setStatus(ProductStatus::STATUS_DISABLED);
1818
$productRepository->save($product);
19-
20-
/**
21-
* We need to remember that automatic reindexation is not working properly in integration tests
22-
* Reindexation is sitting on top of afterCommit callbacks:
23-
* \Magento\Catalog\Model\Product::priceReindexCallback
24-
*
25-
* However, callbacks are applied only when transaction_level = 0 (when transaction is commited), however
26-
* integration tests are not committing transactions, so we need to reindex data manually in order to reuse it in tests
27-
*/
28-
/** @var \Magento\Indexer\Model\Indexer $indexer */
29-
$indexer = \Magento\TestFramework\Helper\Bootstrap
30-
::getObjectManager()->create(\Magento\Indexer\Model\Indexer::class);
31-
$indexer->load('catalog_product_price');
32-
$indexer->reindexList([$product->getId()]);

0 commit comments

Comments
 (0)