-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
PHPUnit 4.1.5 / assertMatch returns Unexpected end tag : hr #1380
Comments
Also, might be worth mentioning that |
@mwjames Would you mind providing us with the HTML you're testing against so that we can build a regression test case? |
While providing the matcher isn't the problem:
Providing the EDIT: The html the test run against would look like this. |
The first failure appears to be in It seemingly asserts a basic form with a simple input element. Can you explain where a Are these the only tests that are failing? If so, are you sure that the tests are correct?
…sounds as if the test fixture document would contain e.g. In any case, I'm not able to relate this unexpected failure to any recent changes in PHPUnit. |
The generator uses something like Currently, my only concern is that 4.1.4 run went smooth but 4.1.5 doesn't without having changed the source nor the tests.
I just locally switched from 4.1.5 to 4.1.4 where the issue does not appear (same environment, same installed base) but as soon as I go back to 4.1.5 the error appears. |
Yep, I can confirm this. I'll see what I can find :) |
Seems c1bf461 is exposing errors that were hidden before. |
Oh, yes, indeed. I assumed that was a Windows-only quirk. Looks like it was also hiding away libxml parser errors on non-Windows platforms? |
Yeah. Seems we were previously only reporting |
So I guess we unknowingly improved error reporting and this "works as designed"…? Perhaps just the error/exception message in the test result could be a bit more clear? |
@sun Let's wait and see what kind of feedback we get from the community / @sebastianbergmann. It is an improvement, but it does break BC because I can't say for sure that this was the way the code was intended to work. @mwjames The failure is caused by having a closing
$this->assertTag( $matcher, $result, '', false ); |
Using When removing |
@mwjames Sorry for the inconvenience. I think we will probably revert this change (or make it optional) for the next release.
Yeah, sorry about that. I hope to have a plugin that we can recommend shortly. |
@sun what do you think about making this optional? |
@mwjames I've started working on an alternative here: https://github.com/phpunit/phpunit-dom-assertions. It's still a work in progress, but it should be available by the time |
Adding an optional |
@sun Sounds good. Thanks :) |
Reopening until we have a regression test :) |
Alright, I'll ping @sebastianbergmann to roll a new release for us. Thanks for your patience, @mwjames. |
Alright, we've released 4.1.6 which should fix this regression. |
Thanks |
Tests running on PHPUnit 4.1.4 went without problems [0]:(on the tests that use
assertMatch
) but when running the same tests against 4.1.5 that use$this->assertTag( $matcher, $result );
aUnexpected end tag : hr
is returned without having changed those specific tests in months.[0] https://travis-ci.org/SemanticMediaWiki/SemanticMediaWiki/jobs/31666571
[1] https://travis-ci.org/SemanticMediaWiki/SemanticMediaWiki/jobs/31739725
The text was updated successfully, but these errors were encountered: