Testing in composer shopware project. How to include shopware unit tests with my tests?

Hi guys I managed to run my tests with Shopware Tests. How to do it ? 

First I was wondering why shopware classses are not included in my autoload. I dig deeper and went to composer.json. 

Aand I just used psr-4 in autload section, to generete my autoload files, by composer dump-autload command

autoload": {
        "classmap": [
            "app/Application.php",
            "app/AppKernel.php",
            "app/ShopwareVersion.php"
        ],
        "psr-4": {
            "Shopware\\Tests\\": "vendor/shopware/shopware/tests"
        }
    },

So now i can just include my shopware tests to test my code and functionalities and execute them together. Here is example of phpunit.xml

 

            ./../custom/plugins/SwagTestExample/Tests
        
      
            ./../vendor/shopware/shopware/tests/Unit
            ./../vendor/shopware/shopware/tests/Functional

 

1 „Gefällt mir“