Skip to content
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

Code paths that create a PHPUnit_Framework_Warning end up serializing/unserializing globals unconditionally #7

Closed
eferreira opened this issue Aug 16, 2010 · 1 comment

Comments

@eferreira
Copy link

When PHPUnit is given a file with no test methods, with private test methods, with no public constructor, etc., it creates a PHPUnit_Framework_Warning object and "runs" it. Since this object has $backupGlobals === NULL, "running" it results in all the globals being serialized and then unserialized. In our environment there are globals that cannot be serialized, so this behavior breaks things and causes subsequent tests in the same suite to fail. So there needs to be a way to turn this behavior off. My suggestion is to have this behavior always be off by adding

    protected $backupGlobals = FALSE;

to the PHPUnit_Framework_Warning class.

@sebastianbergmann
Copy link
Owner

Closed by 12713ff.

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

No branches or pull requests

2 participants