Skip to content

[PhpUnitBridge] include expected deprecations in assertion counter #21828

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

Merged
merged 1 commit into from
Mar 2, 2017

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Mar 1, 2017

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #21786 (comment)
License MIT
Doc PR

We still need to include the changes from #21786 as we cannot increment the number of assertions in the startTest() method (the PHPUnit test runner resets the counter after the listeners have been executed).

@nicolas-grekas
Copy link
Member

Thank you @xabbuh.

@nicolas-grekas nicolas-grekas merged commit cdcd5ae into symfony:master Mar 2, 2017
nicolas-grekas added a commit that referenced this pull request Mar 2, 2017
…tion counter (xabbuh)

This PR was merged into the 3.3-dev branch.

Discussion
----------

[PhpUnitBridge] include expected deprecations in assertion counter

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #21786 (comment)
| License       | MIT
| Doc PR        |

We still need to include the changes from #21786 as we cannot increment the number of assertions in the `startTest()` method (the PHPUnit test runner resets the counter after the listeners have been executed).

Commits
-------

cdcd5ae include expected deprecations in assertion counter
@xabbuh xabbuh deleted the assertion-count branch March 2, 2017 12:24
@stof
Copy link
Member

stof commented Mar 6, 2017

I think the issue is that endTest is actually very late in the process (and after tests are marked as risky). So the assertion count should be registered in startTest (too bad we cannot have a hook at the end of the test execution but before processing the result, to add extra assertions). But this would require registering it in Assert, as the test is rest after the call to the listener

@stof
Copy link
Member

stof commented Mar 6, 2017

My conclusion is that PHPUnit simply does not expect listeners to be a place performing assertions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants