Skip to content

Commit e36df54

Browse files
committed
AC-2643: OpenSearch modules implementation
- stabilize integration tests
1 parent 5fada13 commit e36df54

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/View/AddressInfoTest.php

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace Magento\Sales\Block\Adminhtml\Order\View;
99

10-
use Magento\Config\Model\Config\Factory;
10+
use Magento\Framework\App\Config\ReinitableConfigInterface;
1111
use Magento\Framework\ObjectManagerInterface;
1212
use Magento\Sales\Model\Order;
1313
use Magento\Store\Model\StoreManagerInterface;
@@ -52,21 +52,13 @@ public function testCompanyAddressAttributeVisibleForOrderOnSecondWebsite()
5252
{
5353
$storeManager = $this->objectManager->get(StoreManagerInterface::class);
5454
$website = $storeManager->getWebsites(false, true)['base'];
55-
$configData = [
56-
'section' => 'customer',
57-
'website' => $website->getId(),
58-
'store' => null,
59-
'groups' => [
60-
'address' => [
61-
'fields' => [
62-
'company_show' => ['value' => ''],
63-
],
64-
],
65-
],
66-
];
67-
$configFactory = $this->objectManager->get(Factory::class);
68-
$config = $configFactory->create(['data' => $configData]);
69-
$config->save();
55+
$config = $this->objectManager->get(ReinitableConfigInterface::class);
56+
$config->setValue(
57+
'customer/address/company_show',
58+
'websites',
59+
'',
60+
$website->getId()
61+
);
7062
$orderFixtureStore = $this->objectManager->create(Order::class)->loadByIncrementId('100000001');
7163
$address = $orderFixtureStore->getBillingAddress();
7264
self::assertStringContainsString('Test Company', $this->orderAddressRenderer->format($address, 'html'));

0 commit comments

Comments
 (0)