Definition at line 10 of file ConfigTest.php.
◆ _getConfigFilesPerModule()
_getConfigFilesPerModule |
( |
| ) |
|
|
protected |
Get list of configuration files associated with modules
- Returns
- array
Definition at line 52 of file ConfigTest.php.
58 foreach ($modulesPaths as $moduleName =>
$path) {
59 if (file_exists($configFile =
$path .
'/etc/config.xml')) {
60 $data[$configFile] = $moduleName;
◆ paymentMethodsDataProvider()
paymentMethodsDataProvider |
( |
| ) |
|
Definition at line 38 of file ConfigTest.php.
42 $data[] = [$configFile, $moduleName];
_getConfigFilesPerModule()
◆ testPaymentMethods()
Verify whether all payment methods are declared in appropriate modules
Definition at line 12 of file ConfigTest.php.
14 $invoker = new \Magento\Framework\App\Utility\AggregateInvoker($this);
19 function ($configFile, $moduleName) {
20 $config = simplexml_load_file($configFile);
21 $nodes =
$config->xpath(
'/config/default/payment/*/model') ?: [];
22 $formalModuleName = str_replace(
'_',
'\\', $moduleName);
23 foreach ($nodes as $node) {
25 $this->assertStringStartsWith(
26 $formalModuleName .
'\Model\\',
28 "'{$node}' payment method is declared in '{$configFile}' module, " .
29 "but doesn't belong to '{$moduleName}' module"
static isVirtual($className)
paymentMethodsDataProvider()
The documentation for this class was generated from the following file:
- vendor/magento/magento2-base/dev/tests/static/testsuite/Magento/Test/Integrity/ConfigTest.php