Skip to content

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

Closed
@vbashkirtsev

Description

@vbashkirtsev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugSomething is broken

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions