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

atoum exits when the bootstrap fails #794

Open
Hywan opened this issue Mar 9, 2018 · 2 comments
Open

atoum exits when the bootstrap fails #794

Hywan opened this issue Mar 9, 2018 · 2 comments
Labels

Comments

@Hywan
Copy link
Member

Hywan commented Mar 9, 2018

Hello fellow atoum hackers,

I faced an issue today. On a code we don't control entirely, the PHP version has been updated. PHP now emits errors for undefined constants. That's expect, everything is normal. However, we can't run the tests anymore because atoum exits before running the tests, as defined here:

set_error_handler(function ($error, $message, $file, $line) use ($autorunner) {
$errorReporting = error_reporting();
if ($errorReporting !== 0 && $errorReporting & $error) {
$autorunner->writeError($message . ' in ' . $file . ' at line ' . $line, $error);
exit(3);
}
});

Maybe it's not a good idea to exit the process directly. Logging a message is enough I think. It's very likely that the errors will be reported by the tests too. In our situation, we prefer to see the tests running, and use reports to see the errors, than not being able to run the tests.

Thoughts?

cc @jubianchi @Grummfy

@Grummfy
Copy link
Member

Grummfy commented Mar 9, 2018

as I know it exit from the test and that's all, no? Otherwie we have a behaviour not coherent with the other exit, no?

@Hywan
Copy link
Member Author

Hywan commented Mar 9, 2018

No, it exits if a bootsrap error happens. For an error raised during a test executed, it's reported as is, and the runner continues to execute tests.

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

No branches or pull requests

2 participants