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

Failure to run tests in separate processes if a file included into main process contains constant definition #2158

Closed
vbashkirtsev opened this issue May 10, 2016 · 0 comments
Labels
type/bug Something is broken

Comments

@vbashkirtsev
Copy link
Contributor

If any test running in main process includes a file which contains constant definition then all further tests which should be run in separate processes fail.

The reason is that TestCaseMethod.tpl.dist contains following Smarty statements:

{constants}
{included_files}

Any constants defined by included files will appear in {constants} . Then attempt to re-include {included_files} causes "PHPUnit_Framework_Exception: Notice: Constant CONSTANT already defined in" error.

I consider this to be an error on part of PHPUnit as it appears in ordinary execution of tests.

I propose to suppress all errors generated during loading of all constants and included files as they should not happen otherwise. If any included file contains an error it will manifest itself on the first include attempt. So only error which may happen in this case is collision on constant definitions.

@sebastianbergmann sebastianbergmann added the type/bug Something is broken label May 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something is broken
Projects
None yet
Development

No branches or pull requests

2 participants