Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
HttpsHeadersEnableTest.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Backend\Test\Page\Adminhtml\SystemConfigEdit;
11 use Magento\Mtf\TestCase\Injectable;
12 
24 class HttpsHeadersEnableTest extends Injectable
25 {
26  /* tags */
27  const MVP = 'no';
28  /* end tags */
29 
37  public function test(SystemConfigEdit $systemConfigEdit, ConfigData $httpsConfig)
38  {
39  $systemConfigEdit->open();
40  $section = $httpsConfig->getSection();
41  $keys = array_keys($section);
42  foreach ($keys as $key) {
43  $parts = explode('/', $key, 3);
44  $tabName = $parts[0];
45  $groupName = $parts[1];
46  $fieldName = $parts[2];
47  $systemConfigEdit->getForm()->getGroup($tabName, $groupName)
48  ->setValue($tabName, $groupName, $fieldName, $section[$key]['label']);
49  }
50  }
51 }
test(SystemConfigEdit $systemConfigEdit, ConfigData $httpsConfig)