File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -23,3 +23,23 @@ Or generate unit tests:
2323``` bash
2424bin/magento yireo:test:generate Yireo_Example --type=unit
2525```
26+
27+ ### Extending test types
28+ The Integration Tests can be created by using a custom generator. For instance, there is a ` ConfigTestGenerator ` which allows for a
29+ specific config test case to be created, as long as the PHP class name matches with ` *\Config\Config ` .
30+
31+ ``` xml
32+ <?xml version =" 1.0" ?>
33+ <config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:framework:ObjectManager/etc/config.xsd" >
34+ <type name =" Yireo\TestGenerator\Generator\IntegrationTestGenerator" >
35+ <arguments >
36+ <argument name =" testGenerators" xsi : type =" array" >
37+ <item name =" custom" xsi : type =" object" >YireoTraining\ExampleTestGenerator\Generator\IntegrationTest\CustomTestGenerator</item >
38+ </argument >
39+ </arguments >
40+ </type >
41+ </config >
42+ ```
43+
44+ This generator class needs to implement ` \Yireo\TestGenerator\Generator\IntegrationTest\TestGeneratorInterface ` . See the
45+ ` \Yireo\TestGenerator\Generator\IntegrationTest\ConfigTestGenerator ` for a full example.
You can’t perform that action at this time.
0 commit comments