|
10 | 10 | '<?xml version="1.0"?><config><acl><resources><resource id="Test_Value::show_toolbar" ' .
|
11 | 11 | 'disabled=""/></resources></acl></config>',
|
12 | 12 | [
|
13 |
| - "Element 'resource', attribute 'disabled': '' is not a valid value of the atomic" . |
14 |
| - " type 'xs:boolean'.\nLine: 1\n"], |
| 13 | + "Element 'resource', attribute 'disabled': '' is not a valid value of the atomic type " . |
| 14 | + "'xs:boolean'.\nLine: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><acl><resources>" . |
| 15 | + "<resource id=\"Test_Value::show_toolbar\" disabled=\"\"/></resources></acl>" . |
| 16 | + "</config>\n2:\n" |
| 17 | + ], |
15 | 18 | ],
|
16 | 19 | 'disabled_attribute_wrong_type_value' => [
|
17 | 20 | '<?xml version="1.0"?><config><acl><resources><resource id="Test_Value::show_toolbar" ' .
|
18 | 21 | 'disabled="notBool"/></resources></acl></config>',
|
19 | 22 | [
|
20 | 23 | "Element 'resource', attribute 'disabled': 'notBool' is not a valid value of the atomic type " .
|
21 |
| - "'xs:boolean'.\nLine: 1\n" |
| 24 | + "'xs:boolean'.\nLine: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><acl><resources>" . |
| 25 | + "<resource id=\"Test_Value::show_toolbar\" disabled=\"notBool\"/></resources>" . |
| 26 | + "</acl></config>\n2:\n" |
22 | 27 | ],
|
23 | 28 | ],
|
24 | 29 | 'double_acl' => [
|
25 | 30 | '<?xml version="1.0"?><config><acl><resources></resources></acl><acl/></config>',
|
26 |
| - ["Element 'acl': This element is not expected.\nLine: 1\n"], |
| 31 | + [ |
| 32 | + "Element 'acl': This element is not expected.\nLine: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n" . |
| 33 | + "1:<config><acl><resources/></acl><acl/></config>\n2:\n" |
| 34 | + ], |
27 | 35 | ],
|
28 | 36 | 'double_resource' => [
|
29 | 37 | '<?xml version="1.0"?><config><acl><resources></resources><resources></resources></acl></config>',
|
30 |
| - ["Element 'resources': This element is not expected.\nLine: 1\n"], |
| 38 | + [ |
| 39 | + "Element 'resources': This element is not expected.\nLine: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n" . |
| 40 | + "1:<config><acl><resources/><resources/></acl></config>\n2:\n" |
| 41 | + ], |
31 | 42 | ],
|
32 | 43 | 'less_minLength_title_attribute' => [
|
33 | 44 | '<?xml version="1.0"?><config><acl><resources><resource id="Test_Value::show_toolbar" ' .
|
34 | 45 | 'title="Sh"/></resources></acl></config>',
|
35 | 46 | [
|
36 |
| - "Element 'resource', attribute 'title': [facet 'minLength'] The value 'Sh' has a length of '2'; " . |
37 |
| - "this underruns the allowed minimum length of '3'.\nLine: 1\n" |
| 47 | + "Element 'resource', attribute 'title': [facet 'minLength'] The value 'Sh' has a length of '2'; this " . |
| 48 | + "underruns the allowed minimum length of '3'.\nLine: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n" . |
| 49 | + "1:<config><acl><resources><resource id=\"Test_Value::show_toolbar\" title=\"Sh\"/></resources>" . |
| 50 | + "</acl></config>\n2:\n" |
38 | 51 | ],
|
39 | 52 | ],
|
40 | 53 | 'more_maxLength_title_attribute' => [
|
41 | 54 | '<?xml version="1.0"?><config><acl><resources><resource id="Test_Value::show_toolbar"' .
|
42 | 55 | ' title="Lorem ipsum dolor sit amet, consectetur adipisicing"/></resources></acl></config>',
|
43 | 56 | [
|
44 | 57 | "Element 'resource', attribute 'title': [facet 'maxLength'] The value 'Lorem ipsum dolor sit amet, " .
|
45 |
| - "consectetur adipisicing' has a length of '51'; this exceeds the allowed maximum" . |
46 |
| - " length of '50'.\nLine: 1\n" |
| 58 | + "consectetur adipisicing' has a length of '51'; this exceeds the allowed maximum length of '50'.\n" . |
| 59 | + "Line: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><acl><resources><resource " . |
| 60 | + "id=\"Test_Value::show_toolbar\" title=\"Lorem ipsum dolor sit amet, consectetur adipisicing\"/>" . |
| 61 | + "</resources></acl></config>\n2:\n" |
47 | 62 | ],
|
48 | 63 | ],
|
49 | 64 | 'notvalid_id_attribute_value_regexp1' => [
|
50 | 65 | '<?xml version="1.0"?><config><acl><resources><resource id="test_Value::show_toolbar"/>' .
|
51 | 66 | '</resources></acl></config>',
|
52 | 67 | [
|
53 |
| - "Element 'resource', attribute 'id': [facet 'pattern'] The value 'test_Value::show_toolbar' is " . |
54 |
| - "not accepted by the pattern" . |
55 |
| - " '([A-Z]+[a-zA-Z0-9]{1,}){1,}_[A-Z]+[A-Z0-9a-z]{1,}::[A-Za-z_0-9]{1,}'.\nLine: 1\n" |
| 68 | + "Element 'resource', attribute 'id': [facet 'pattern'] The value 'test_Value::show_toolbar' is not " . |
| 69 | + "accepted by the pattern '([A-Z]+[a-zA-Z0-9]{1,}){1,}_[A-Z]+[A-Z0-9a-z]{1,}::[A-Za-z_0-9]{1,}'.\n" . |
| 70 | + "Line: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><acl><resources><resource " . |
| 71 | + "id=\"test_Value::show_toolbar\"/></resources></acl></config>\n2:\n" |
56 | 72 | ],
|
57 | 73 | ],
|
58 | 74 | 'notvalid_id_attribute_value_regexp2' => [
|
59 | 75 | '<?xml version="1.0"?><config><acl><resources><resource id="Test_value::show_toolbar"/>' .
|
60 | 76 | '</resources></acl></config>',
|
61 | 77 | [
|
62 | 78 | "Element 'resource', attribute 'id': [facet 'pattern'] The value 'Test_value::show_toolbar' is not " .
|
63 |
| - "accepted by the pattern '([A-Z]+[a-zA-Z0-9]{1,}){1,}_[A-Z]+[A-Z0-9a-z]{1,}::[A-Za-z_0-9]{1,}'.\nLine: 1\n" |
| 79 | + "accepted by the pattern '([A-Z]+[a-zA-Z0-9]{1,}){1,}_[A-Z]+[A-Z0-9a-z]{1,}::[A-Za-z_0-9]{1,}'.\n" . |
| 80 | + "Line: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><acl><resources><resource " . |
| 81 | + "id=\"Test_value::show_toolbar\"/></resources></acl></config>\n2:\n" |
64 | 82 | ],
|
65 | 83 | ],
|
66 | 84 | 'notvalid_id_attribute_value_regexp3' => [
|
67 | 85 | '<?xml version="1.0"?><config><acl><resources><resource id="M@#$%^*_Value::show_toolbar"/>' .
|
68 | 86 | '</resources></acl></config>',
|
69 | 87 | [
|
70 | 88 | "Element 'resource', attribute 'id': [facet 'pattern'] The value 'M@#$%^*_Value::show_toolbar' is not " .
|
71 |
| - "accepted by the pattern '([A-Z]+[a-zA-Z0-9]{1,}){1,}_[A-Z]+[A-Z0-9a-z]{1,}::[A-Za-z_0-9]{1,}'.\nLine: 1\n" |
| 89 | + "accepted by the pattern '([A-Z]+[a-zA-Z0-9]{1,}){1,}_[A-Z]+[A-Z0-9a-z]{1,}::[A-Za-z_0-9]{1,}'.\n" . |
| 90 | + "Line: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><acl><resources><resource " . |
| 91 | + "id=\"M@#$%^*_Value::show_toolbar\"/></resources></acl></config>\n2:\n" |
72 | 92 | ],
|
73 | 93 | ],
|
74 | 94 | 'notvalid_id_attribute_value_regexp4' => [
|
75 | 95 | '<?xml version="1.0"?><config><acl><resources><resource id="_Value::show_toolbar"/>' .
|
76 | 96 | '</resources></acl></config>',
|
77 | 97 | [
|
78 | 98 | "Element 'resource', attribute 'id': [facet 'pattern'] The value '_Value::show_toolbar' is not " .
|
79 |
| - "accepted by the pattern '([A-Z]+[a-zA-Z0-9]{1,}){1,}_[A-Z]+[A-Z0-9a-z]{1,}::[A-Za-z_0-9]{1,}'.\nLine: 1\n" |
| 99 | + "accepted by the pattern '([A-Z]+[a-zA-Z0-9]{1,}){1,}_[A-Z]+[A-Z0-9a-z]{1,}::[A-Za-z_0-9]{1,}'.\n" . |
| 100 | + "Line: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><acl><resources><resource " . |
| 101 | + "id=\"_Value::show_toolbar\"/></resources></acl></config>\n2:\n" |
80 | 102 | ],
|
81 | 103 | ],
|
82 | 104 | 'notvalid_id_attribute_value_regexp5' => [
|
83 | 105 | '<?xml version="1.0"?><config><acl><resources><resource id="Value_::show_toolbar"/></resources>' .
|
84 | 106 | '</acl></config>',
|
85 | 107 | [
|
86 |
| - "Element 'resource', attribute 'id': [facet 'pattern'] The value 'Value_::show_toolbar' is not " . |
87 |
| - "accepted by the pattern '([A-Z]+[a-zA-Z0-9]{1,}){1,}_[A-Z]+[A-Z0-9a-z]{1,}::[A-Za-z_0-9]{1,}'.\nLine: 1\n" |
| 108 | + "Element 'resource', attribute 'id': [facet 'pattern'] The value 'Value_::show_toolbar' is not accepted " . |
| 109 | + "by the pattern '([A-Z]+[a-zA-Z0-9]{1,}){1,}_[A-Z]+[A-Z0-9a-z]{1,}::[A-Za-z_0-9]{1,}'.\nLine: 1\n" . |
| 110 | + "The xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><acl><resources><resource " . |
| 111 | + "id=\"Value_::show_toolbar\"/></resources></acl></config>\n2:\n" |
88 | 112 | ],
|
89 | 113 | ],
|
90 | 114 | 'notvalid_id_attribute_value_regexp6' => [
|
91 | 115 | '<?xml version="1.0"?><config><acl><resources><resource id="Test_value:show_toolbar"/>' .
|
92 | 116 | '</resources></acl></config>',
|
93 | 117 | [
|
94 | 118 | "Element 'resource', attribute 'id': [facet 'pattern'] The value 'Test_value:show_toolbar' is not " .
|
95 |
| - "accepted by the pattern '([A-Z]+[a-zA-Z0-9]{1,}){1,}_[A-Z]+[A-Z0-9a-z]{1,}::[A-Za-z_0-9]{1,}'.\nLine: 1\n" |
| 119 | + "accepted by the pattern '([A-Z]+[a-zA-Z0-9]{1,}){1,}_[A-Z]+[A-Z0-9a-z]{1,}::[A-Za-z_0-9]{1,}'.\n" . |
| 120 | + "Line: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><acl><resources><resource " . |
| 121 | + "id=\"Test_value:show_toolbar\"/></resources></acl></config>\n2:\n" |
96 | 122 | ],
|
97 | 123 | ],
|
98 | 124 | 'notvalid_id_attribute_value_regexp7' => [
|
99 |
| - '<?xml version="1.0"?><config><acl><resources><resource id="Test_Value::"/></resources>' . '</acl></config>', |
| 125 | + '<?xml version="1.0"?><config><acl><resources><resource id="Test_Value::"/></resources>' . |
| 126 | + '</acl></config>', |
100 | 127 | [
|
101 | 128 | "Element 'resource', attribute 'id': [facet 'pattern'] The value 'Test_Value::' is not accepted by " .
|
102 |
| - "the pattern '([A-Z]+[a-zA-Z0-9]{1,}){1,}_[A-Z]+[A-Z0-9a-z]{1,}::[A-Za-z_0-9]{1,}'.\nLine: 1\n" |
| 129 | + "the pattern '([A-Z]+[a-zA-Z0-9]{1,}){1,}_[A-Z]+[A-Z0-9a-z]{1,}::[A-Za-z_0-9]{1,}'.\nLine: 1\n" . |
| 130 | + "The xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><acl><resources><resource " . |
| 131 | + "id=\"Test_Value::\"/></resources></acl></config>\n2:\n" |
103 | 132 | ],
|
104 | 133 | ],
|
105 | 134 | 'sortOrder_attribute_empty_value' => [
|
106 | 135 | '<?xml version="1.0"?><config><acl><resources><resource id="Test_Value::show_toolbar" ' .
|
107 | 136 | 'title="Lorem ipsum" sortOrder="stringValue"/></resources></acl></config>',
|
108 | 137 | [
|
109 |
| - "Element 'resource', attribute 'sortOrder': 'stringValue' is not a valid value of the atomic " . |
110 |
| - "type 'xs:int'.\nLine: 1\n" |
| 138 | + "Element 'resource', attribute 'sortOrder': 'stringValue' is not a valid value of the atomic type " . |
| 139 | + "'xs:int'.\nLine: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><acl><resources><resource " . |
| 140 | + "id=\"Test_Value::show_toolbar\" title=\"Lorem ipsum\" sortOrder=\"stringValue\"/></resources>" . |
| 141 | + "</acl></config>\n2:\n" |
111 | 142 | ],
|
112 | 143 | ],
|
113 | 144 | 'sortOrder_attribute_wrong_type_value' => [
|
114 |
| - '<?xml version="1.0"?><config><acl><resources><resource id="Test_Value::show_toolbar" ' . |
| 145 | + '<?xml version="1.0"?><config><acl><resources><resource id="Test_Value::show_toolbar" ' . |
115 | 146 | 'title="Lorem ipsum" sortOrder=""/></resources></acl></config>',
|
116 |
| - ["Element 'resource', attribute 'sortOrder': '' is not a valid value of the atomic type 'xs:int'.\nLine: 1\n"], |
| 147 | + [ |
| 148 | + "Element 'resource', attribute 'sortOrder': '' is not a valid value of the atomic type 'xs:int'.\n" . |
| 149 | + "Line: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><acl><resources><resource " . |
| 150 | + "id=\"Test_Value::show_toolbar\" title=\"Lorem ipsum\" sortOrder=\"\"/></resources></acl></config>\n2:\n" |
| 151 | + ], |
117 | 152 | ],
|
118 | 153 | 'with_not_allowed_attribute' => [
|
119 | 154 | '<?xml version="1.0"?><config><acl><resources><resource id="Test_Value::show_toolbar" ' .
|
120 | 155 | 'someatrrname="some value"/></resources></acl></config>',
|
121 |
| - ["Element 'resource', attribute 'someatrrname': The attribute 'someatrrname' is not allowed.\nLine: 1\n"], |
| 156 | + [ |
| 157 | + "Element 'resource', attribute 'someatrrname': The attribute 'someatrrname' is not allowed.\nLine: 1\n" . |
| 158 | + "The xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><acl><resources><resource " . |
| 159 | + "id=\"Test_Value::show_toolbar\" someatrrname=\"some value\"/></resources>" . |
| 160 | + "</acl></config>\n2:\n" |
| 161 | + ], |
122 | 162 | ],
|
123 | 163 | 'with_two_same_id' => [
|
124 | 164 | '<?xml version="1.0"?><config><acl><resources><resource id="Test_Value::show_toolbar" ' .
|
125 | 165 | 'title="Lorem ipsum"/><resource id="Test_Value::show_toolbar" title="Lorem ipsum"/>' .
|
126 | 166 | '</resources></acl></config>',
|
127 | 167 | [
|
128 | 168 | "Element 'resource': Duplicate key-sequence ['Test_Value::show_toolbar'] in unique identity-constraint " .
|
129 |
| - "'uniqueResourceId'.\nLine: 1\n" |
| 169 | + "'uniqueResourceId'.\nLine: 1\nThe xml was: \n0:<?xml version=\"1.0\"?>\n1:<config><acl><resources>" . |
| 170 | + "<resource id=\"Test_Value::show_toolbar\" title=\"Lorem ipsum\"/><resource " . |
| 171 | + "id=\"Test_Value::show_toolbar\" title=\"Lorem ipsum\"/></resources></acl></config>\n2:\n" |
130 | 172 | ],
|
131 | 173 | ],
|
132 | 174 | 'without_acl' => [
|
133 | 175 | '<?xml version="1.0"?><config/>',
|
134 |
| - ["Element 'config': Missing child element(s). Expected is ( acl ).\nLine: 1\n"], |
| 176 | + [ |
| 177 | + "Element 'config': Missing child element(s). Expected is ( acl ).\nLine: 1\nThe xml was: \n" . |
| 178 | + "0:<?xml version=\"1.0\"?>\n1:<config/>\n2:\n" |
| 179 | + ], |
135 | 180 | ],
|
136 | 181 | 'without_required_id_attribute' => [
|
137 | 182 | '<?xml version="1.0"?><config><acl><resources><resource title="Notifications"/></resources></acl></config>',
|
138 |
| - ["Element 'resource': The attribute 'id' is required but missing.\nLine: 1\n"], |
| 183 | + [ |
| 184 | + "Element 'resource': The attribute 'id' is required but missing.\nLine: 1\nThe xml was: \n" . |
| 185 | + "0:<?xml version=\"1.0\"?>\n1:<config><acl><resources><resource title=\"Notifications\"/>" . |
| 186 | + "</resources></acl></config>\n2:\n" |
| 187 | + ], |
139 | 188 | ],
|
140 | 189 | 'without_resource' => [
|
141 | 190 | '<?xml version="1.0"?><config><acl/></config>',
|
142 |
| - ["Element 'acl': Missing child element(s). Expected is ( resources ).\nLine: 1\n"], |
143 |
| - ] |
| 191 | + [ |
| 192 | + "Element 'acl': Missing child element(s). Expected is ( resources ).\nLine: 1\nThe xml was: \n" . |
| 193 | + "0:<?xml version=\"1.0\"?>\n1:<config><acl/></config>\n2:\n" |
| 194 | + ], |
| 195 | + ], |
144 | 196 | ];
|
0 commit comments