Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ModuleXMLTest.php
Go to the documentation of this file.
1 <?php
8 
12 class ModuleXMLTest extends \PHPUnit\Framework\TestCase
13 {
18  public function testModuleXml($file)
19  {
20  $xml = simplexml_load_file($file);
21  $this->assertEmpty(
22  $xml->xpath('/config/module/@version'),
23  'The "version" attribute is obsolete. Use "setup_version" instead.'
24  );
25  $this->assertEmpty(
26  $xml->xpath('/config/module/@active'),
27  'The "active" attribute is obsolete. The list of active modules is defined in deployment configuration.'
28  );
29  }
30 
34  public function moduleXmlDataProvider()
35  {
36  return \Magento\Framework\App\Utility\Files::init()->getConfigFiles('module.xml');
37  }
38 }