Problem/Motivation
The assertion counter in the phpunit test class is not increased by mink based assertions. This leads to risky test if a test only consists of mink/session assertions. (And the assertion report of the test in not correct).
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | 2805849-1.patch | 695 bytes | catch |
| #2 | 2805849-1.patch | 2.51 KB | webflo |
Comments
Comment #2
webflo commentedJust a WIP patch, it does not work because Behat\Mink\WebAssert::assert is private.
Comment #11
catchUploading just the test to see what happens six years later.
Comment #12
mondrakeAdding a related issues, that proposes to change WebAssert implementation to report PHPUnit failures (hence counting assertions) instead of throwing exceptions.
Comment #14
mondrakeI think this is superceded now, see #3271214-31: Change BrowserTestBase to flag PHPUnit failures instead of throwing Mink exceptions and following. Should we set this to Closed (outdated)?
Comment #15
longwaveIn UiHelperTrait we also do this to work around this issue:
Should we at least remove the call to addToAssertionCount() in BTB::setUp() if we are doing this as well?
Comment #16
mondrakeHow about doing all the cleanup in #3271214: Change BrowserTestBase to flag PHPUnit failures instead of throwing Mink exceptions?
Comment #17
longwaveI don't think #3271214 is related really, but maybe we should repurpose this to remove at least one of the calls to
$this->addToAssertionCount(1);as we apparently have at least two, we should investigate how and why that happened.Comment #18
mondrakeFine, issue summary and title need an update then.