Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trim "\n" and "\t" characters when replacing relative paths with absolute ones during XML config creation #1550

Merged
merged 1 commit into from
Aug 9, 2021

Conversation

maks-rafalko
Copy link
Member

@maks-rafalko maks-rafalko commented Aug 9, 2021

Fixes #1542

When XML config contains "\n" or "\t" characters in the tag with paths, it breaks the path when Infection replaces relative paths with absolute ones.

Solution: just trim it.

Example of the problematic phpunit.xml:

https://github.com/alexdodonov/mezon-router/blob/dea1e597aba3dbd86148b9e9fc129048530c3280/phpunit.xml#L13-L15

Reason of the bug in debugger:

tabs-bug

@maks-rafalko maks-rafalko added this to the 0.25.0 milestone Aug 9, 2021
<testsuites>
<testsuite name="All Tests">
<directory suffix="UnitTest.php">
./Tests
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not visible here, but ./Tests is rounded by \n\t

@maks-rafalko maks-rafalko merged commit d3f81b1 into master Aug 9, 2021
@maks-rafalko maks-rafalko deleted the bugfix/tabs-in-phpunit-xml branch August 9, 2021 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No line of code was executed during tests.
2 participants