Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
ObsoleteMenuTest Class Reference
Inheritance diagram for ObsoleteMenuTest:

Public Member Functions

 testMenuDeclaration ()
 

Detailed Description

Definition at line 12 of file ObsoleteMenuTest.php.

Member Function Documentation

◆ testMenuDeclaration()

testMenuDeclaration ( )
Parameters
string$menuFile

Definition at line 14 of file ObsoleteMenuTest.php.

15  {
16  $invoker = new \Magento\Framework\App\Utility\AggregateInvoker($this);
17  $invoker(
21  function ($menuFile) {
22  $menuXml = simplexml_load_file($menuFile);
23  $xpath = '/config/menu/*[boolean(./children) or boolean(./title) or boolean(./action)]';
24  $this->assertEmpty(
25  $menuXml->xpath($xpath),
26  'Obsolete menu structure detected in file ' . $menuFile . '.'
27  );
28  },
29  \Magento\Framework\App\Utility\Files::init()->getMainConfigFiles()
30  );
31  }

The documentation for this class was generated from the following file: