8000 [PhpUnitBridge] Fixed fatal error in CoverageListener when something goes wrong in Test::setUpBeforeClass by lyrixx · Pull Request #24796 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[PhpUnitBridge] Fixed fatal error in CoverageListener when something goes wrong in Test::setUpBeforeClass #24796

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
Nov 3, 2017

Conversation

lyrixx
Copy link
Member
@lyrixx lyrixx commented Nov 2, 2017
Q A
Branch? 3.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR

@lyrixx
Copy link
Member Author
lyrixx commented Nov 2, 2017

Hmm, I tried to add a test but it's not really possible.

@xabbuh
Copy link
Member
xabbuh commented Nov 2, 2017

When can it happen that this method does not exist?

@lyrixx
Copy link
Member Author
lyrixx commented Nov 2, 2017

Ah yes I removed the test. but it is still in the PR title and commit message ;)
Try to throw an exception in the setUpBeforeClass and you will see.
(Note I did not dig in PHPUnit to find the root cause. I'm not sure I want to :D )

@xabbuh
Copy link
Member
xabbuh commented Nov 2, 2017

Could it be related to $test being an instance of TestSuite but not TestCase?

@lyrixx
Copy link
Member Author
lyrixx commented Nov 2, 2017

I don't know. What do you have in mind ?

@xabbuh
Copy link
Member
xabbuh commented Nov 2, 2017

We could then use instanceof instead.

@lyrixx
Copy link
Member Author
lyrixx commented Nov 2, 2017

I was pretty sure you are going to say that.
using instanceof will be a bit boring because we manage many PHPUnit version (pear convention vs namespace :/)

@xabbuh
Copy link
Member
xabbuh commented Nov 2, 2017

There is an alias for the namespaced class in PHPUnit 4.8 and 5.x. :)

@lyrixx
Copy link
Member Author
lyrixx commented Nov 3, 2017

@xabbuh It should be ok

@fabpot
Copy link
Member
fabpot commented Nov 3, 2017

Thank you @lyrixx.

@fabpot fabpot merged commit 25e0117 into symfony:3.4 Nov 3, 2017
fabpot added a commit that referenced this pull request Nov 3, 2017
… something goes wrong in Test::setUpBeforeClass (lyrixx)

This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Fixed fatal error in CoverageListener when something goes wrong in Test::setUpBeforeClass

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

25e0117 [PhpUnitBridge] Fixed fatal error in CoverageListener when something goes wrong in Test::setUpBeforeClass
@lyrixx lyrixx deleted the phpunit branch November 3, 2017 14:13
This was referenced Nov 5, 2017
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.

5 participants
0