File tree Expand file tree Collapse file tree 1 file changed +8
-16
lines changed
dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/View Expand file tree Collapse file tree 1 file changed +8
-16
lines changed Original file line number Diff line number Diff line change 7
7
8
8
namespace Magento \Sales \Block \Adminhtml \Order \View ;
9
9
10
- use Magento \Config \ Model \Config \Factory ;
10
+ use Magento \Framework \ App \Config \ReinitableConfigInterface ;
11
11
use Magento \Framework \ObjectManagerInterface ;
12
12
use Magento \Sales \Model \Order ;
13
13
use Magento \Store \Model \StoreManagerInterface ;
@@ -52,21 +52,13 @@ public function testCompanyAddressAttributeVisibleForOrderOnSecondWebsite()
52
52
{
53
53
$ storeManager = $ this ->objectManager ->get (StoreManagerInterface::class);
54
54
$ 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
+ );
70
62
$ orderFixtureStore = $ this ->objectManager ->create (Order::class)->loadByIncrementId ('100000001 ' );
71
63
$ address = $ orderFixtureStore ->getBillingAddress ();
72
64
self ::assertStringContainsString ('Test Company ' , $ this ->orderAddressRenderer ->format ($ address , 'html ' ));
You can’t perform that action at this time.
0 commit comments