Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AbstractIntegrity.php
Go to the documentation of this file.
1 <?php
11 
12 abstract class AbstractIntegrity extends \PHPUnit\Framework\TestCase
13 {
19  protected $_enabledModules = null;
20 
26  protected function _getEnabledModules()
27  {
28  if ($this->_enabledModules === null) {
30  $helper = \Magento\TestFramework\Helper\Factory::getHelper(\Magento\TestFramework\Helper\Config::class);
31  $enabledModules = $helper->getEnabledModules();
32  $this->_enabledModules = array_combine($enabledModules, $enabledModules);
33  }
35  }
36 
43  protected function _isFileForDisabledModule($file)
44  {
45  $enabledModules = $this->_getEnabledModules();
46  if (preg_match('/^(.*)::/', $file, $matches)) {
47  $module = $matches[1];
48  if (!isset($enabledModules[$module])) {
49  return true;
50  }
51  }
52  return false;
53  }
54 
60  protected function _getDesignThemes()
61  {
62  $themeItems = [];
65  \Magento\Theme\Model\ResourceModel\Theme\Collection::class
66  );
68  foreach ($themeCollection as $theme) {
69  $themeItems[$theme->getId()] = $theme;
70  }
71  return $themeItems;
72  }
73 }
$helper
Definition: iframe.phtml:13
$theme