File tree Expand file tree Collapse file tree 11 files changed +14
-45
lines changed
adminhtml/Magento/backend/etc
framework/Magento/TestFramework/Utility
testsuite/Magento/Test/Integrity/Xml
lib/internal/Magento/Framework Expand file tree Collapse file tree 11 files changed +14
-45
lines changed Original file line number Diff line number Diff line change 5
5
* See COPYING.txt for license details.
6
6
*/
7
7
-->
8
- <view xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:module:Magento_ProductVideo: etc/view.xsd" >
8
+ <view xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:framework:ProductVideo/ etc/view.xsd" >
9
9
<media >
10
10
<videos module =" Magento_ProductVideo" >
11
11
<video id =" play_if_base" type =" play_if_base" >
Original file line number Diff line number Diff line change 5
5
* See COPYING.txt for license details.
6
6
*/
7
7
-->
8
- <view xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:module:Magento_Catalog: etc/view.xsd" >
8
+ <view xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:framework:Catalog/ etc/view.xsd" >
9
9
<media >
10
10
<images module =" Magento_Catalog" >
11
11
<image id =" swatch_image" type =" swatch_image" >
Original file line number Diff line number Diff line change 5
5
* See COPYING.txt for license details.
6
6
*/
7
7
-->
8
- <view xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:module:Magento_Catalog: etc/view.xsd" >
8
+ <view xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:framework:Catalog/ etc/view.xsd" >
9
9
<vars module =" Js_Bundle" >
10
10
<var name =" bundle_size" >1MB</var >
11
11
</vars >
Original file line number Diff line number Diff line change 5
5
* See COPYING.txt for license details.
6
6
*/
7
7
-->
8
- <view xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:module:Magento_Catalog: etc/view.xsd" >
8
+ <view xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:framework:Catalog/ etc/view.xsd" >
9
9
<media >
10
10
<images module =" Magento_Catalog" >
11
11
<image id =" bundled_product_customization_page" type =" thumbnail" >
Original file line number Diff line number Diff line change 5
5
* See COPYING.txt for license details.
6
6
*/
7
7
-->
8
- <view xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:module:Magento_Catalog: etc/view.xsd" >
8
+ <view xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:framework:Catalog/ etc/view.xsd" >
9
9
<media >
10
10
<images module =" Magento_Catalog" >
11
11
<image id =" bundled_product_customization_page" type =" thumbnail" >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 7
7
namespace Magento \Test \Integrity \Xml ;
8
8
9
9
use Magento \Framework \Component \ComponentRegistrar ;
10
- use Magento \Framework \Config \Dom \UrnResolver ;
11
10
12
11
class SchemaTest extends \PHPUnit_Framework_TestCase
13
12
{
@@ -36,18 +35,11 @@ function ($filename) {
36
35
. 'xsi:noNamespaceSchemaLocation="urn:magento:framework:Relative_Path/something.xsd" '
37
36
);
38
37
39
- try {
40
- $ schemaFile = (new UrnResolver ())->getRealPath ($ schemaLocations [1 ]);
41
- $ this ->assertFileExists ($ schemaFile , "$ filename refers to an invalid schema $ schemaFile. " );
42
- $ errors = \Magento \TestFramework \Utility \Validator::validateXml ($ dom , $ schemaFile );
43
- $ this ->assertEmpty (
44
- $ errors ,
45
- "Error validating $ filename against $ schemaFile \n" . print_r ($ errors , true )
46
- );
47
- } catch (\UnexpectedValueException $ e ) {
48
- $ this ->fail ($ e ->getMessage ());
49
- }
50
-
38
+ $ errors = \Magento \Framework \Config \Dom::validateDomDocument ($ dom , $ schemaLocations [1 ]);
39
+ $ this ->assertEmpty (
40
+ $ errors ,
41
+ "Error validating $ filename against {$ schemaLocations [1 ]}\n" . print_r ($ errors , true )
42
+ );
51
43
},
52
44
$ this ->getXmlFiles ()
53
45
);
Original file line number Diff line number Diff line change
1
+ Library contains schema files used to validate XML files in Magento\Catalog module
Original file line number Diff line number Diff line change 6
6
*/
7
7
-->
8
8
<xs : schema xmlns : xs =" http://www.w3.org/2001/XMLSchema" >
9
- <xs : redefine schemaLocation =" urn:magento:framework: Config/etc/view.xsd" >
9
+ <xs : redefine schemaLocation =" ../../ Config/etc/view.xsd" >
10
10
<xs : complexType name =" mediaType" mixed =" true" >
11
11
<xs : complexContent >
12
12
<xs : extension base =" mediaType" >
Original file line number Diff line number Diff line change
1
+ Library contains schema files used to validate XML files in Magento\ProductVideo module
You can’t perform that action at this time.
0 commit comments