-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
Tests: make testBrokenRulesetMultiError() test compatible with LibXML 2.12+ #767
Comments
@remicollet That's a new test and in all the runs I've done with it, it is passing fine, both locally as well as in CI. |
Indeed seems related to new lilbxml 2.12 in recent Fedora/RHEL Test suite passes on
Test fails on
|
So then the question really becomes: is this something the test should accommodate ? Or is this a bug in the error reporting from the new |
Question is rather, are you testing libxml, or that phpcs properly find an error ? ;) Output changes in libxml messages are quite common (example)
|
What I'm testing in that test is the custom error handling within PHPCS for errors coming reported by libxml. In particular, that if there are multiple errors reported by libxml, these are displayed correctly and in a readable fashion by PHPCS. Basically, that test is testing the multi-error handling in the PHP_CodeSniffer/src/Ruleset.php Lines 486 to 499 in 855f261
Which means the test fixture deliberately has three XML errors, but it looks like libxml 2.12 is only reporting two, so even if I would ignore the specific message text from the libxml errors, I'd still want the regex to verify that exactly 3 errors are shown, while it looks like libxml is now reporting 2, which is not useful for this test. |
Are 2 not "multiple errors" ? |
True, but I kind of wanted to test with > 2 errors. |
Okay, so what I think needs to happen here:
I don't have access to a PHP version build with @remicollet As for the test runs you manage, I suppose you could add a Note: the |
;) |
@remicollet Nice try, but I'm on Windows ;-) |
Running test suite on a git clone (with PHP 8.1, 8.2, 8.3 or 8.4)
The text was updated successfully, but these errors were encountered: