|
1 | 1 | <?php
|
2 | 2 | /**
|
3 |
| - * Copyright © Magento, Inc. All rights reserved. |
4 |
| - * See COPYING.txt for license details. |
| 3 | + * Copyright 2013 Adobe |
| 4 | + * All Rights Reserved. |
5 | 5 | */
|
6 | 6 | declare(strict_types=1);
|
7 | 7 |
|
|
13 | 13 | "Line: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><type name=\"some_name\"/><type " .
|
14 | 14 | "name=\"some_name\"/></config>\n2:\n"
|
15 | 15 | ],
|
| 16 | + 'isRegex' => false |
16 | 17 | ],
|
17 | 18 | 'type_without_required_name_attribute' => [
|
18 | 19 | '<?xml version="1.0"?><config><type /></config>',
|
19 | 20 | [
|
20 | 21 | "Element 'type': The attribute 'name' is required but missing.\n" .
|
21 | 22 | "Line: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><type/></config>\n2:\n"
|
22 | 23 | ],
|
| 24 | + 'isRegex' => false |
23 | 25 | ],
|
24 | 26 | 'type_with_notallowed_attribute' => [
|
25 | 27 | '<?xml version="1.0"?><config><type name="some_name" notallowed="text"/></config>',
|
|
28 | 30 | "Line: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><type name=\"some_name\" " .
|
29 | 31 | "notallowed=\"text\"/></config>\n2:\n"
|
30 | 32 | ],
|
| 33 | + 'isRegex' => false |
31 | 34 | ],
|
32 | 35 | 'type_modelinstance_invalid_value' => [
|
33 | 36 | '<?xml version="1.0"?><config><type name="some_name" modelInstance="123" /></config>',
|
34 | 37 | [
|
35 |
| - "Element 'type', attribute 'modelInstance': '123' is not a valid value of the atomic type 'modelName'.\n" . |
36 |
| - "Line: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><type name=\"some_name\" " . |
37 |
| - "modelInstance=\"123\"/></config>\n2:\n" |
| 38 | + "/Element \'type\', attribute \'modelInstance\': .* (is not a valid value|is not accepted).*/" |
38 | 39 | ],
|
| 40 | + 'isRegex' => true |
39 | 41 | ],
|
40 | 42 | 'type_indexpriority_invalid_value' => [
|
41 | 43 | '<?xml version="1.0"?><config><type name="some_name" indexPriority="-1" /></config>',
|
|
44 | 46 | "'xs:nonNegativeInteger'.\nLine: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n" .
|
45 | 47 | "1:<config><type name=\"some_name\" indexPriority=\"-1\"/></config>\n2:\n"
|
46 | 48 | ],
|
| 49 | + 'isRegex' => false |
47 | 50 | ],
|
48 | 51 | 'type_canuseqtydecimals_invalid_value' => [
|
49 | 52 | '<?xml version="1.0"?><config><type name="some_name" canUseQtyDecimals="string" /></config>',
|
|
52 | 55 | "'xs:boolean'.\nLine: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n" .
|
53 | 56 | "1:<config><type name=\"some_name\" canUseQtyDecimals=\"string\"/></config>\n2:\n"
|
54 | 57 | ],
|
| 58 | + 'isRegex' => false |
55 | 59 | ],
|
56 | 60 | 'type_isqty_invalid_value' => [
|
57 | 61 | '<?xml version="1.0"?><config><type name="some_name" isQty="string" /></config>',
|
|
60 | 64 | "\nLine: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><type name=\"some_name\" " .
|
61 | 65 | "isQty=\"string\"/></config>\n2:\n"
|
62 | 66 | ],
|
| 67 | + 'isRegex' => false |
63 | 68 | ],
|
64 | 69 | 'type_pricemodel_without_required_instance_attribute' => [
|
65 | 70 | '<?xml version="1.0"?><config><type name="some_name"><priceModel /></type></config>',
|
66 | 71 | [
|
67 | 72 | "Element 'priceModel': The attribute 'instance' is required but missing.\nLine: 1\nThe xml was: \n" .
|
68 | 73 | "0:<?xml version=\"1.0\"?>\n1:<config><type name=\"some_name\"><priceModel/></type></config>\n2:\n"
|
69 | 74 | ],
|
| 75 | + 'isRegex' => false |
70 | 76 | ],
|
71 | 77 | 'type_pricemodel_instance_invalid_value' => [
|
72 | 78 | '<?xml version="1.0"?><config><type name="some_name"><priceModel instance="123123" /></type></config>',
|
73 | 79 | [
|
74 |
| - "Element 'priceModel', attribute 'instance': '123123' is not a valid value of the atomic " . |
75 |
| - "type 'modelName'.\nLine: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><type " . |
76 |
| - "name=\"some_name\"><priceModel instance=\"123123\"/></type></config>\n2:\n" |
| 80 | + "/Element \'priceModel\', attribute \'instance\': .* (is not a valid value|is not accepted).*/" |
77 | 81 | ],
|
| 82 | + 'isRegex' => true |
78 | 83 | ],
|
79 | 84 | 'type_indexermodel_instance_invalid_value' => [
|
80 | 85 | '<?xml version="1.0"?><config><type name="some_name"><indexerModel instance="123" /></type></config>',
|
81 | 86 | [
|
82 |
| - "Element 'indexerModel', attribute 'instance': '123' is not a valid value of the atomic type " . |
83 |
| - "'modelName'.\nLine: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><type " . |
84 |
| - "name=\"some_name\"><indexerModel instance=\"123\"/></type></config>\n2:\n" |
| 87 | + "/Element \'indexerModel\', attribute \'instance\': .* (is not a valid value|is not accepted).*/" |
85 | 88 | ],
|
| 89 | + 'isRegex' => true |
86 | 90 | ],
|
87 | 91 | 'type_indexermodel_without_required_instance_attribute' => [
|
88 | 92 | '<?xml version="1.0"?><config><type name="some_name"><indexerModel /></type></config>',
|
89 | 93 | [
|
90 | 94 | "Element 'indexerModel': The attribute 'instance' is required but missing.\nLine: 1\nThe xml was: \n" .
|
91 | 95 | "0:<?xml version=\"1.0\"?>\n1:<config><type name=\"some_name\"><indexerModel/></type></config>\n2:\n"
|
92 | 96 | ],
|
| 97 | + 'isRegex' => false |
93 | 98 | ],
|
94 | 99 | 'stockindexermodel_without_required_instance_attribute' => [
|
95 | 100 | '<?xml version="1.0"?><config><type name="some_name"><stockIndexerModel /></type></config>',
|
|
98 | 103 | "Line: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n" .
|
99 | 104 | "1:<config><type name=\"some_name\"><stockIndexerModel/></type></config>\n2:\n"
|
100 | 105 | ],
|
| 106 | + 'isRegex' => false |
101 | 107 | ],
|
102 | 108 | 'stockindexermodel_instance_invalid_value' => [
|
103 | 109 | '<?xml version="1.0"?><config><type name="some_name"><stockIndexerModel instance="1234"/></type></config>',
|
104 | 110 | [
|
105 |
| - "Element 'stockIndexerModel', attribute 'instance': '1234' is not a valid value of the atomic type " . |
106 |
| - "'modelName'.\nLine: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><type " . |
107 |
| - "name=\"some_name\"><stockIndexerModel instance=\"1234\"/></type></config>\n2:\n" |
| 111 | + "/Element \'stockIndexerModel\', attribute \'instance\': .* (is not a valid value|is not accepted).*/" |
108 | 112 | ],
|
| 113 | + 'isRegex' => true |
109 | 114 | ],
|
110 | 115 | 'allowedselectiontypes_without_required_type_handle' => [
|
111 | 116 | '<?xml version="1.0"?><config><type name="some_name"><allowedSelectionTypes /></type></config>',
|
|
114 | 119 | "Line: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><type name=\"some_name\">" .
|
115 | 120 | "<allowedSelectionTypes/></type></config>\n2:\n"
|
116 | 121 | ],
|
| 122 | + 'isRegex' => false |
117 | 123 | ],
|
118 | 124 | 'allowedselectiontypes_type_without_required_name' => [
|
119 | 125 | '<?xml version="1.0"?><config><type name="some_name"><allowedSelectionTypes><type/></allowedSelectionTypes>"
|
|
127 | 133 | "1:<config><type name=\"some_name\"><allowedSelectionTypes><type/>" .
|
128 | 134 | "</allowedSelectionTypes>\"\n2: . \"</type></config>\n3:\n"
|
129 | 135 | ],
|
| 136 | + 'isRegex' => false |
130 | 137 | ]
|
131 | 138 | ];
|
0 commit comments