Skip to content

Commit 321a136

Browse files
committed
MC-33493: Test render fields in composite configure block for simple and configurable product
1 parent 7126f97 commit 321a136

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

dev/tests/integration/testsuite/Magento/Catalog/Block/Product/View/Options/AbstractRenderCustomOptionsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ protected function addOptionToProduct(
373373
*/
374374
protected function getOptionHtml(ProductInterface $product): string
375375
{
376-
$this->page->addHandle($this->getHandlesList($product));
376+
$this->page->addHandle($this->getHandlesList());
377377
$this->page->getLayout()->generateXml();
378378
/** @var Options $optionsBlock */
379379
$optionsBlock = $this->page->getLayout()->getBlock($this->getOptionsBlockName());

dev/tests/integration/testsuite/Magento/Store/_files/second_store_with_second_currency_rollback.php

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,35 @@
44
* See COPYING.txt for license details.
55
*/
66
declare(strict_types=1);
7+
8+
use Magento\Config\Model\ResourceModel\Config;
9+
use Magento\Directory\Model\Currency as ModelCurrency;
10+
use Magento\Directory\Model\ResourceModel\Currency as ResourceCurrency;
11+
use Magento\Store\Model\ScopeInterface;
12+
use Magento\Store\Model\Store;
13+
use Magento\TestFramework\Helper\Bootstrap;
714
use Magento\TestFramework\Workaround\Override\Fixture\Resolver;
815

9-
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
10-
$store = $objectManager->create(\Magento\Store\Model\Store::class);
16+
$objectManager = Bootstrap::getObjectManager();
17+
$store = $objectManager->create(Store::class);
1118
$storeId = $store->load('fixture_second_store', 'code')->getId();
1219

1320
if ($storeId) {
14-
$configResource = $objectManager->get(\Magento\Config\Model\ResourceModel\Config::class);
21+
$configResource = $objectManager->get(Config::class);
1522
$configResource->deleteConfig(
16-
\Magento\Directory\Model\Currency::XML_PATH_CURRENCY_DEFAULT,
17-
\Magento\Store\Model\ScopeInterface::SCOPE_STORES,
23+
ModelCurrency::XML_PATH_CURRENCY_DEFAULT,
24+
ScopeInterface::SCOPE_STORES,
1825
$storeId
1926
);
2027
$configResource->deleteConfig(
21-
\Magento\Directory\Model\Currency::XML_PATH_CURRENCY_ALLOW,
22-
\Magento\Store\Model\ScopeInterface::SCOPE_STORES,
28+
ModelCurrency::XML_PATH_CURRENCY_ALLOW,
29+
ScopeInterface::SCOPE_STORES,
2330
$storeId
2431
);
2532
}
2633

2734
Resolver::getInstance()->requireDataFixture('Magento/Store/_files/second_store_rollback.php');
35+
$reflectionClass = new \ReflectionClass(ResourceCurrency::class);
36+
$staticProperty = $reflectionClass->getProperty('_rateCache');
37+
$staticProperty->setAccessible(true);
38+
$staticProperty->setValue(null);

0 commit comments

Comments
 (0)