File tree Expand file tree Collapse file tree 4 files changed +1
-51
lines changed
dev/tests/integration/testsuite/Magento/Framework/Search/_files
lib/internal/Magento/Framework/Config Expand file tree Collapse file tree 4 files changed +1
-51
lines changed Original file line number Diff line number Diff line change 35
35
'match_query ' => [
36
36
'value ' => '$match_term_override$ ' ,
37
37
'name ' => 'match_query ' ,
38
- 'boost ' => '1 ' ,
39
38
'match ' => [
40
39
0 => [
41
40
'field ' => 'match_field ' ,
51
50
],
52
51
'must_query ' => [
53
52
'name ' => 'must_query ' ,
54
- 'boost ' => '1 ' ,
55
53
'filterReference ' => [
56
54
0 => [
57
55
'clause ' => 'must ' ,
62
60
],
63
61
'should_query ' => [
64
62
'name ' => 'should_query ' ,
65
- 'boost ' => '1 ' ,
66
63
'filterReference ' => [
67
64
0 => [
68
65
'clause ' => 'should ' ,
73
70
],
74
71
'not_query ' => [
75
72
'name ' => 'not_query ' ,
76
- 'boost ' => '1 ' ,
77
73
'filterReference ' => [
78
74
0 => [
79
75
'clause ' => 'not ' ,
84
80
],
85
81
'match_query_2 ' => [
86
82
'value ' => '$match_term_override$ ' ,
87
- 'boost ' => '1 ' ,
88
83
'name ' => 'match_query_2 ' ,
89
84
'match ' => [
90
85
0 => [
168
163
'queries ' => [
169
164
'filter_query ' => [
170
165
'name ' => 'filter_query ' ,
171
- 'boost ' => '1 ' ,
172
166
'filterReference ' => [
173
167
0 =>
174
168
[
236
230
'new_match_query ' => [
237
231
'value ' => '$match_term$ ' ,
238
232
'name ' => 'new_match_query ' ,
239
- 'boost ' => '1 ' ,
240
233
'match ' => [
241
234
0 =>
242
235
[
Original file line number Diff line number Diff line change @@ -379,7 +379,7 @@ public static function validateDomDocument(
379
379
libxml_set_external_entity_loader ([self ::$ urnResolver , 'registerEntityLoader ' ]);
380
380
$ errors = [];
381
381
try {
382
- $ result = $ dom ->schemaValidate ($ schema, LIBXML_SCHEMA_CREATE );
382
+ $ result = $ dom ->schemaValidate ($ schema );
383
383
if (!$ result ) {
384
384
$ errors = self ::getXmlErrors ($ errorFormat );
385
385
}
Original file line number Diff line number Diff line change @@ -169,48 +169,6 @@ public function validateDataProvider()
169
169
];
170
170
}
171
171
172
- /**
173
- * @param string $xml
174
- * @param string $expectedValue
175
- * @dataProvider validateWithDefaultValueDataProvider
176
- */
177
- public function testValidateWithDefaultValue ($ xml , $ expectedValue )
178
- {
179
- if (!function_exists ('libxml_set_external_entity_loader ' )) {
180
- $ this ->markTestSkipped ('Skipped on HHVM. Will be fixed in MAGETWO-45033 ' );
181
- }
182
-
183
- $ actualErrors = [];
184
-
185
- $ dom = new \Magento \Framework \Config \Dom ($ xml , $ this ->validationStateMock );
186
- $ dom ->validate (__DIR__ . '/_files/sample.xsd ' , $ actualErrors );
187
-
188
- $ actualValue = $ dom ->getDom ()
189
- ->getElementsByTagName ('root ' )->item (0 )
190
- ->getElementsByTagName ('node ' )->item (0 )
191
- ->getAttribute ('attribute_with_default_value ' );
192
-
193
- $ this ->assertEmpty ($ actualErrors );
194
- $ this ->assertEquals ($ expectedValue , $ actualValue );
195
- }
196
-
197
- /**
198
- * @return array
199
- */
200
- public function validateWithDefaultValueDataProvider ()
201
- {
202
- return [
203
- 'default_value ' => [
204
- '<root><node id="id1"/></root> ' ,
205
- 'default_value '
206
- ],
207
- 'custom_value ' => [
208
- '<root><node id="id1" attribute_with_default_value="non_default_value"/></root> ' ,
209
- 'non_default_value '
210
- ],
211
- ];
212
- }
213
-
214
172
public function testValidateCustomErrorFormat ()
215
173
{
216
174
$ xml = '<root><unknown_node/></root> ' ;
Original file line number Diff line number Diff line change 21
21
<xs : simpleContent >
22
22
<xs : extension base =" xs:string" >
23
23
<xs : attribute name =" id" type =" xs:string" use =" required" />
24
- <xs : attribute name =" attribute_with_default_value" type =" xs:string" default =" default_value" />
25
24
</xs : extension >
26
25
</xs : simpleContent >
27
26
</xs : complexType >
You can’t perform that action at this time.
0 commit comments