Skip to content

Commit ca3578a

Browse files
committed
MC-38349: Create automated test for SVC changes
- Completed XSD
1 parent 757d686 commit ca3578a

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

tests/Unit/Console/Command/CompareSourceCommandXsdSchemasTest.php

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public function changesDataProvider()
6060
$pathToFixtures . '/optional-node-added/source-code-after',
6161
[
6262
'Suggested semantic versioning change: MINOR',
63+
'CompareSourceCommandTest/_files/xsd-schema/optional-node-added/source-code-after/Magento/TestModule/etc/test-schema.xsd:0',
6364
'addedOptionalElement | An optional node was added | M0133',
6465
],
6566
'Minor change is detected.',
@@ -69,6 +70,7 @@ public function changesDataProvider()
6970
$pathToFixtures . '/optional-attribute-added/source-code-after',
7071
[
7172
'Suggested semantic versioning change: MINOR',
73+
'CompareSourceCommandTest/_files/xsd-schema/optional-attribute-added/source-code-after/Magento/TestModule/etc/test-schema.xsd:0',
7274
'optionalAttribute | An optional attribute was added | M0134',
7375
],
7476
'Minor change is detected.',
@@ -78,6 +80,7 @@ public function changesDataProvider()
7880
$pathToFixtures . '/required-node-added/source-code-after',
7981
[
8082
'Suggested semantic versioning change: MAJOR',
83+
'CompareSourceCommandTest/_files/xsd-schema/required-node-added/source-code-after/Magento/TestModule/etc/test-schema.xsd:0',
8184
'addedRequiredElement | A required node was added | M0135',
8285
],
8386
'Major change is detected.',
@@ -87,6 +90,7 @@ public function changesDataProvider()
8790
$pathToFixtures . '/required-attribute-added/source-code-after',
8891
[
8992
'Suggested semantic versioning change: MAJOR',
93+
'CompareSourceCommandTest/_files/xsd-schema/required-attribute-added/source-code-after/Magento/TestModule/etc/test-schema.xsd:0',
9094
'requiredAttribute | A required attribute was added | M0136',
9195
],
9296
'Major change is detected.',
@@ -96,8 +100,8 @@ public function changesDataProvider()
96100
$pathToFixtures . '/node-removed/source-code-after',
97101
[
98102
'Suggested semantic versioning change: MAJOR',
99-
'requiredElement | A node was removed | M0137',
100-
'optionalElement | A node was removed | M0137',
103+
'CompareSourceCommandTest/_files/xsd-schema/node-removed/source-code-before/Magento/TestModule/etc/test-schema.xsd:0 | requiredElement | A node was removed | M0137',
104+
'CompareSourceCommandTest/_files/xsd-schema/node-removed/source-code-before/Magento/TestModule/etc/test-schema.xsd:0 | optionalElement | A node was removed | M0137',
101105
],
102106
'Major change is detected.',
103107
],
@@ -106,8 +110,8 @@ public function changesDataProvider()
106110
$pathToFixtures . '/attribute-removed/source-code-after',
107111
[
108112
'Suggested semantic versioning change: MAJOR',
109-
'requiredAttribute | An attribute was removed | M0138',
110-
'optionalAttribute | An attribute was removed | M0138',
113+
'CompareSourceCommandTest/_files/xsd-schema/attribute-removed/source-code-before/Magento/TestModule/etc/test-schema.xsd:0 | requiredAttribute | An attribute was removed | M0138',
114+
'CompareSourceCommandTest/_files/xsd-schema/attribute-removed/source-code-before/Magento/TestModule/etc/test-schema.xsd:0 | optionalAttribute | An attribute was removed | M0138',
111115
],
112116
'Major change is detected.',
113117
],
@@ -116,7 +120,8 @@ public function changesDataProvider()
116120
$pathToFixtures . '/schema-declaration-removed/source-code-after',
117121
[
118122
'Suggested semantic versioning change: MAJOR',
119-
'/etc/test-schema.xsd | A schema declaration was removed | M0139',
123+
'CompareSourceCommandTest/_files/xsd-schema/schema-declaration-removed/source-code-before/Magento/TestModule/etc/test-schema.xsd:0',
124+
'/etc/test-schema.xsd | A schema declaration was removed | M0139'
120125
],
121126
'Major change is detected.',
122127
],
@@ -125,6 +130,7 @@ public function changesDataProvider()
125130
$pathToFixtures . '/schema-declaration-added/source-code-after',
126131
[
127132
'Suggested semantic versioning change: MINOR',
133+
'CompareSourceCommandTest/_files/xsd-schema/schema-declaration-added/source-code-after/Magento/TestModule/etc/test-schema.xsd:0',
128134
'/etc/test-schema.xsd | A schema declaration was added | M0140',
129135
],
130136
'Minor change is detected.',
@@ -134,6 +140,7 @@ public function changesDataProvider()
134140
$pathToFixtures . '/module-added/source-code-after',
135141
[
136142
'Suggested semantic versioning change: MINOR',
143+
'CompareSourceCommandTest/_files/xsd-schema/module-added/source-code-after/Magento/TestModule/etc/test-schema.xsd:0',
137144
'/etc/test-schema.xsd | A schema declaration was added | M0140',
138145
],
139146
'Minor change is detected.',
@@ -143,6 +150,7 @@ public function changesDataProvider()
143150
$pathToFixtures . '/module-removed/source-code-after',
144151
[
145152
'Suggested semantic versioning change: MAJOR',
153+
'CompareSourceCommandTest/_files/xsd-schema/module-removed/source-code-before/Magento/TestModule/etc/test-schema.xsd:0',
146154
'/etc/test-schema.xsd | A schema declaration was removed | M0139',
147155
],
148156
'Major change is detected.',

0 commit comments

Comments
 (0)