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

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


Copy link

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:


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
type/bug Something is broken
None yet

No branches or pull requests

2 participants