pestphp / pest

Pest is an elegant PHP testing Framework with a focus on simplicity, meticulously designed to bring back the joy of testing in PHP.
https://pestphp.com
MIT License
9.06k stars 313 forks source link

[2.x] Fix JUnit output for mutation testing #1145

Open nuernbergerA opened 2 months ago

nuernbergerA commented 2 months ago

What:

Description:

Mutation testing relies on real generated phpunit classes under the hood of pest. (for example P\Tests\CalculatorTest::__pest_evaluable_it_adds)

my current junit implementation for pest is printing the "pretty" name Tests\CalculatorTest::it adds which is nice for humans not for other libs that try to work with the generated test classes by pest

Im reverting method and class name related changes which should fix it. We still override the junit logger to get the proper file location

Test this fix

composer.json

{
    "require-dev": {
        "pestphp/pest": "dev-junit-revert-naming as v2.35.0"
    },
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/nuernbergerA/pest"
        }
    ]
}

Related:

Fixes #1095

alexandre-daubois commented 4 weeks ago

Would be amazing to see this merged! I can confirm it also fixes the issue on our project 🚀