Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
invalidIndexerXmlArray.php
Go to the documentation of this file.
1 <?php
6 return [
7  'without_indexer_handle' => [
8  '<?xml version="1.0"?><config></config>',
9  ["Element 'config': Missing child element(s). Expected is ( indexer ).\nLine: 1\n"],
10  ],
11  'indexer_with_notallowed_attribute' => [
12  '<?xml version="1.0"?><config>' .
13  '<indexer id="somename" view_id="view_01" class="Class\Name" notallowed="some value">' .
14  '<title>Test</title><description>Test</description></indexer></config>',
15  ["Element 'indexer', attribute 'notallowed': The attribute 'notallowed' is not allowed.\nLine: 1\n"],
16  ],
17  'indexer_without_view_attribute' => [
18  '<?xml version="1.0"?><config><indexer id="somename" class="Class\Name">' .
19  '<title>Test</title><description>Test</description></indexer></config>',
20  ["Element 'indexer': The attribute 'view_id' is required but missing.\nLine: 1\n"],
21  ],
22  'indexer_duplicate_view_attribute' => [
23  '<?xml version="1.0"?><config><indexer id="somename" view_id="view_01" class="Class\Name">' .
24  '<title>Test</title><description>Test</description></indexer>' .
25  '<indexer id="somename_two" view_id="view_01" class="Class\Name">' .
26  '<title>Test</title><description>Test</description></indexer></config>',
27  [
28  "Element 'indexer': Duplicate key-sequence ['view_01'] in unique identity-constraint"
29  . " 'uniqueViewId'.\nLine: 1\n"
30  ],
31  ],
32 ];