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

Use stdout stream for reports when available #97

Open
wants to merge 2 commits into
base: 9.0
Choose a base branch
from

Conversation

kl-he
Copy link

@kl-he kl-he commented Oct 20, 2021

Use stdout stream for reports when available. This avoids "Headers already sent" types of issues, when manipulating a session during testing.

When manipulating headers during acceptance testing, those tests would fail, if a report with output was activated. This could be the situation if running Codeception tests from PHPStorm.

A workaround is to use ob_start() in a bootstrap as described here https://stackoverflow.com/questions/31175636/headers-already-sent-running-unit-tests-in-phpstorm and here https://intellij-support.jetbrains.com/hc/en-us/community/posts/360000404160-Codeception-test-reports-Headers-already-sent-in-vendor-phpunit-phpunit-src-Util-Printer-php-on-line-109.

Using ob_start(), the user has to wait for all tests to complete, before the report-output is available.

Klaus Heigren added 2 commits October 19, 2021 13:12
Use stdout stream for reports when available. This avoids "Headers
already sent" types of issues, when manipulating a session during
testing.
The constant is defined as fopen('php://stdout', 'w'), not php://stdout.
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

Successfully merging this pull request may close these issues.

1 participant