|
| 1 | +<?xml version="1.0"?> |
| 2 | +<!-- |
| 3 | +/** |
| 4 | + * Copyright © Magento, Inc. All rights reserved. |
| 5 | + * See COPYING.txt for license details. |
| 6 | + */ |
| 7 | +--> |
| 8 | +<overrides> |
| 9 | + <!-- test node determine to which class config inside node should be applied --> |
| 10 | + <test class="Magento\TestModuleOverrideConfig\MagentoApiConfigFixture\AddFixtureTest"> |
| 11 | + <!-- Node bellow will add magentoConfigFixture to fixtures list |
| 12 | + 'scopeType' required attribute and accept such values: store|website |
| 13 | + 'scopeCode' store|website code |
| 14 | + skip 'scopeType' and 'scopeCode' attributes to set value in default scope |
| 15 | + 'path' required attribute determine config path, 'value' attribute determine which value will be set for provided path |
| 16 | + to add fixture to fixtures list |
| 17 | + --> |
| 18 | + <magentoConfigFixture scopeType="store" scopeCode="default" path="test_section/test_group/field_1" value="overridden value for full class"/> |
| 19 | + <!-- method node determine to which test method config inside node should be applied --> |
| 20 | + <method name="testAddFixtureToMethod"> |
| 21 | + <magentoConfigFixture scopeType="store" scopeCode="default" path="test_section/test_group/field_1" value="overridden value for method"/> |
| 22 | + <!-- dataSet node determine for which data set config inside should be applied --> |
| 23 | + <dataSet name="second_data_set"> |
| 24 | + <magentoConfigFixture scopeType="store" scopeCode="default" path="test_section/test_group/field_1" value="overridden value for data set"/> |
| 25 | + </dataSet> |
| 26 | + </method> |
| 27 | + <method name="testAddFixtureOnWebsiteScope"> |
| 28 | + <magentoConfigFixture scopeType="website" scopeCode="base" path="test_section/test_group/field_1" value="overridden value for method on website scope"/> |
| 29 | + </method> |
| 30 | + </test> |
| 31 | + <test class="Magento\TestModuleOverrideConfig\MagentoApiConfigFixture\RemoveFixtureTest"> |
| 32 | + <!-- 'remove' attribute accept bool values, if value set to 'true' this node will remove matching fixture from fixtures list--> |
| 33 | + <magentoConfigFixture scopeType="store" scopeCode="default" path="test_section/test_group/field_1" remove="true"/> |
| 34 | + <method name="testRemoveFixtureForMethod"> |
| 35 | + <magentoConfigFixture scopeType="store" scopeCode="default" path="test_section/test_group/field_2" remove="true"/> |
| 36 | + <dataSet name="second_data_set"> |
| 37 | + <magentoConfigFixture scopeType="store" scopeCode="default" path="test_section/test_group/field_3" remove="true"/> |
| 38 | + </dataSet> |
| 39 | + </method> |
| 40 | + <method name="testRemoveWebsiteScopeFixture"> |
| 41 | + <magentoConfigFixture scopeType="website" scopeCode="base" path="test_section/test_group/field_3" remove="true"/> |
| 42 | + </method> |
| 43 | + <method name="testRemoveWebsiteScopeFixtureWithScopeCode"> |
| 44 | + <magentoConfigFixture scopeType="website" scopeCode="base" path="test_section/test_group/field_3" remove="true"/> |
| 45 | + </method> |
| 46 | + </test> |
| 47 | + <test class="Magento\TestModuleOverrideConfig\MagentoApiConfigFixture\ReplaceFixtureTest"> |
| 48 | + <!-- Node bellow will replace value for matching fixture |
| 49 | + 'newValue' attribute determine to which value current value in matching fixture should be replaced --> |
| 50 | + <magentoConfigFixture scopeType="store" scopeCode="default" path="test_section/test_group/field_1" newValue="Overridden fixture for class"/> |
| 51 | + <method name="testReplaceFixtureForMethod"> |
| 52 | + <dataSet name="second_data_set"> |
| 53 | + <magentoConfigFixture scopeType="store" scopeCode="default" path="test_section/test_group/field_1" newValue="Overridden fixture for data set"/> |
| 54 | + </dataSet> |
| 55 | + <magentoConfigFixture scopeType="store" scopeCode="default" path="test_section/test_group/field_1" newValue="Overridden fixture for method"/> |
| 56 | + </method> |
| 57 | + <method name="testReplaceFixtureViaThirdModule" > |
| 58 | + <dataSet name="second_data_set"> |
| 59 | + <magentoConfigFixture scopeType="store" scopeCode="default" path="test_section/test_group/field_1" newValue="Overridden fixture for data set from second module"/> |
| 60 | + </dataSet> |
| 61 | + <magentoConfigFixture scopeType="store" scopeCode="default" path="test_section/test_group/field_1" newValue="Overridden fixture for method from second module"/> |
| 62 | + </method> |
| 63 | + <method name="testReplaceWebsiteScopedFixture"> |
| 64 | + <magentoConfigFixture scopeType="website" scopeCode="base" path="test_section/test_group/field_1" newValue="Overridden value for website scope"/> |
| 65 | + </method> |
| 66 | + <method name="testReplaceDefaultConfig"> |
| 67 | + <magentoConfigFixture path="test_section/test_group/field_1" newValue="Overridden value for default scope"/> |
| 68 | + </method> |
| 69 | + </test> |
| 70 | + <test class="Magento\TestModuleOverrideConfig\MagentoApiDataFixture\AddFixtureTest"> |
| 71 | + <!-- 'path' attribute determine path to fixture for which config should be applied |
| 72 | + if only this attribute specified the fixture with such path will be applied --> |
| 73 | + <magentoApiDataFixture path="Magento/TestModuleOverrideConfig2/_files/fixture1_second_module.php"/> |
| 74 | + <method name="testAddFixtures"> |
| 75 | + <magentoApiDataFixture path="Magento/TestModuleOverrideConfig2/_files/fixture2_second_module.php"/> |
| 76 | + <dataSet name="first_data_set"> |
| 77 | + <magentoApiDataFixture path="Magento/TestModuleOverrideConfig2/_files/fixture3_second_module.php"/> |
| 78 | + </dataSet> |
| 79 | + </method> |
| 80 | + <method name="testAddSameFixtures"> |
| 81 | + <!-- Few same data fixtures can be applied for one test --> |
| 82 | + <magentoApiDataFixture path="Magento/TestModuleOverrideConfig2/_files/fixture2_second_module.php"/> |
| 83 | + <magentoApiDataFixture path="Magento/TestModuleOverrideConfig2/_files/fixture2_second_module.php"/> |
| 84 | + </method> |
| 85 | + <method name="testAddFixtureWithRequiredFixture"> |
| 86 | + <magentoApiDataFixture path="Magento/TestModuleOverrideConfig2/_files/fixture_with_required_fixture.php"/> |
| 87 | + </method> |
| 88 | + </test> |
| 89 | + <test class="Magento\TestModuleOverrideConfig\MagentoApiDataFixture\RemoveFixtureTest"> |
| 90 | + <!-- 'remove' attribute support boolean values, to remove fixture with specified path you need to set this 'remove' attribute to 'true' --> |
| 91 | + <magentoApiDataFixture path="Magento/TestModuleOverrideConfig/_files/fixture1_first_module.php" remove="true"/> |
| 92 | + <method name="testRemoveFixtureForMethod"> |
| 93 | + <magentoApiDataFixture path="Magento/TestModuleOverrideConfig/_files/fixture2_first_module.php" remove="true"/> |
| 94 | + <dataSet name="second_data_set"> |
| 95 | + <magentoApiDataFixture path="Magento/TestModuleOverrideConfig/_files/fixture3_first_module.php" remove="true"/> |
| 96 | + </dataSet> |
| 97 | + </method> |
| 98 | + <method name="testRemoveSameFixtures"> |
| 99 | + <magentoApiDataFixture path="Magento/TestModuleOverrideConfig/_files/fixture2_first_module.php" remove="true"/> |
| 100 | + <magentoApiDataFixture path="Magento/TestModuleOverrideConfig/_files/fixture2_first_module.php" remove="true"/> |
| 101 | + </method> |
| 102 | + </test> |
| 103 | + <test class="Magento\TestModuleOverrideConfig\MagentoApiDataFixture\ReplaceFixtureTest"> |
| 104 | + <!-- Node bellow will call specified in 'newPath' attribute fixture instead of fixture specified in 'path' attribute |
| 105 | + if such fixture exist in fixtures list --> |
| 106 | + <magentoApiDataFixture path="Magento/TestModuleOverrideConfig/_files/fixture1_first_module.php" newPath="Magento/TestModuleOverrideConfig2/_files/fixture1_second_module.php" /> |
| 107 | + <!-- If you specify data fixture to replace you should also specify rollback fixture in the separate node--> |
| 108 | + <magentoApiDataFixture path="Magento/TestModuleOverrideConfig/_files/fixture1_first_module_rollback.php" newPath="Magento/TestModuleOverrideConfig2/_files/fixture1_second_module_rollback.php" /> |
| 109 | + |
| 110 | + <method name="testReplaceFixturesForMethod"> |
| 111 | + <magentoApiDataFixture path="Magento/TestModuleOverrideConfig/_files/fixture1_first_module.php" newPath="Magento/TestModuleOverrideConfig2/_files/fixture2_second_module.php" /> |
| 112 | + <magentoApiDataFixture path="Magento/TestModuleOverrideConfig/_files/fixture1_first_module_rollback.php" newPath="Magento/TestModuleOverrideConfig2/_files/fixture2_second_module_rollback.php" /> |
| 113 | + <dataSet name="second_data_set"> |
| 114 | + <magentoApiDataFixture path="Magento/TestModuleOverrideConfig/_files/fixture1_first_module.php" newPath="Magento/TestModuleOverrideConfig2/_files/fixture3_second_module.php" /> |
| 115 | + <magentoApiDataFixture path="Magento/TestModuleOverrideConfig/_files/fixture1_first_module_rollback.php" newPath="Magento/TestModuleOverrideConfig2/_files/fixture3_second_module_rollback.php" /> |
| 116 | + </dataSet> |
| 117 | + </method> |
| 118 | + <method name="testReplaceFixtureViaThirdModule"> |
| 119 | + <magentoApiDataFixture path="Magento/TestModuleOverrideConfig/_files/fixture1_first_module.php" newPath="Magento/TestModuleOverrideConfig2/_files/fixture2_second_module.php" /> |
| 120 | + <magentoApiDataFixture path="Magento/TestModuleOverrideConfig/_files/fixture1_first_module_rollback.php" newPath="Magento/TestModuleOverrideConfig2/_files/fixture2_second_module_rollback.php" /> |
| 121 | + <dataSet name="first_data_set"> |
| 122 | + <magentoApiDataFixture path="Magento/TestModuleOverrideConfig/_files/fixture1_first_module.php" newPath="Magento/TestModuleOverrideConfig2/_files/fixture3_second_module.php" /> |
| 123 | + <magentoApiDataFixture path="Magento/TestModuleOverrideConfig/_files/fixture1_first_module_rollback.php" newPath="Magento/TestModuleOverrideConfig2/_files/fixture3_second_module_rollback.php" /> |
| 124 | + </dataSet> |
| 125 | + </method> |
| 126 | + <method name="testReplaceRequiredFixture"> |
| 127 | + <magentoApiDataFixture path="Magento/TestModuleOverrideConfig2/_files/fixture3_second_module.php" newPath="Magento/TestModuleOverrideConfig2/_files/fixture2_second_module.php" /> |
| 128 | + </method> |
| 129 | + </test> |
| 130 | + <test class="Magento\TestModuleOverrideConfig\MagentoApiDataFixture\SortFixturesTest"> |
| 131 | + <!-- 'after' attribute determine after which fixture current fixture should be placed, '-' value means that fixture shold be placed after all --> |
| 132 | + <magentoApiDataFixture path="Magento/TestModuleOverrideConfig2/_files/fixture1_second_module.php" after="Magento/TestModuleOverrideConfig/_files/fixture1_first_module.php"/> |
| 133 | + <method name="testSortFixtures"> |
| 134 | + <magentoApiDataFixture path="Magento/TestModuleOverrideConfig2/_files/fixture2_second_module.php" after="-"/> |
| 135 | + <dataSet name="first_data_set"> |
| 136 | + <magentoApiDataFixture path="Magento/TestModuleOverrideConfig2/_files/fixture3_second_module.php" before="-"/> |
| 137 | + </dataSet> |
| 138 | + </method> |
| 139 | + </test> |
| 140 | + <!-- 'skip' attribute accept boolean values and will mark test as skipped test for which it specified if value set to 'true'--> |
| 141 | + <test class="Magento\TestModuleOverrideConfig\Skip\SkipClassTest" skip="true"/> |
| 142 | + <test class="Magento\TestModuleOverrideConfig\Skip\SkipMethodTest"> |
| 143 | + <method name="testMethodSkip" skip="true"/> |
| 144 | + </test> |
| 145 | + <test class="Magento\TestModuleOverrideConfig\Skip\SkipDataSetTest"> |
| 146 | + <method name="testSkipDataSet"> |
| 147 | + <dataSet name="first_data_set" skip="true"/> |
| 148 | + </method> |
| 149 | + </test> |
| 150 | +</overrides> |
0 commit comments