123456789101112131415161718192021222324252627282930 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- /**
- * Legacy tests to find obsolete system configuration declaration
- */
- namespace Magento\Test\Legacy;
- class ObsoleteSystemConfigurationTest extends \PHPUnit\Framework\TestCase
- {
- public function testSystemConfigurationDeclaration()
- {
- $fileList = \Magento\Framework\App\Utility\Files::init()->getConfigFiles(
- 'system.xml',
- ['wsdl.xml', 'wsdl2.xml', 'wsi.xml'],
- false
- );
- foreach ($fileList as $configFile) {
- $configXml = simplexml_load_file($configFile);
- $xpath = '/config/tabs|/config/sections';
- $this->assertEmpty(
- $configXml->xpath($xpath),
- 'Obsolete system configuration structure detected in file ' . $configFile . '.'
- );
- }
- }
- }
|