22 self::_populateUsedGroups();
23 self::_populateRegisteredGroups();
29 private static function _populateUsedGroups()
38 foreach ($configFiles as $file) {
42 $dom = new \DOMDocument();
45 $xpath = new \DOMXPath($dom);
46 foreach ($xpath->query(
'/config/*/payment/*/group') as
$group) {
47 if (!in_array(
$group->nodeValue, self::$_usedGroups)) {
48 self::$_usedGroups[] =
$group->nodeValue;
57 private static function _populateRegisteredGroups()
66 foreach ($configFiles as $file) {
70 $dom = new \DOMDocument();
73 $xpath = new \DOMXPath($dom);
74 foreach ($xpath->query(
'/payment/groups/group') as
$group) {
75 $id =
$group->attributes->getNamedItem(
'id')->nodeValue;
76 if (!in_array(
$id, self::$_registeredGroups)) {
77 self::$_registeredGroups[] =
$id;
85 $missing = array_diff(self::$_usedGroups, self::$_registeredGroups);
87 if (!empty($missing)) {
89 "The groups, referenced in store configuration for the payment, " .
90 "don't correspond to any payment group declared in payment.xml: %s",
91 implode(
', ', $missing)
static $_registeredGroups
static setUpBeforeClass()