Skip to content

tests: prevent output in phpunit tests#1158

Open
outdooracorn wants to merge 1 commit into
refactor-phpunit-configfrom
prevent-output-in-phpunit-tests
Open

tests: prevent output in phpunit tests#1158
outdooracorn wants to merge 1 commit into
refactor-phpunit-configfrom
prevent-output-in-phpunit-tests

Conversation

@outdooracorn

@outdooracorn outdooracorn commented Jun 10, 2026

Copy link
Copy Markdown
Member
  • Modify ElasticSearchIndexDeleteTest so it doesn't print output.
  • beStrictAboutOutputDuringTests marks tests as "risky" if there is output printed.
  • failOnRisky makes the test suite fail if any tests are marked as "risky".

Bug: T428716

@outdooracorn outdooracorn self-assigned this Jun 10, 2026
@outdooracorn outdooracorn force-pushed the prevent-output-in-phpunit-tests branch from 107b920 to ec2cbd2 Compare June 10, 2026 13:58
@deer-wmde

Copy link
Copy Markdown
Contributor

+1 to fix the test by calling fail() on error

a bit unsure about removing the output from the integration test

* Modify `ElasticSearchIndexDeleteTest` so it doesn't print output.
* `beStrictAboutOutputDuringTests` marks tests as "risky" if there is output printed.
* `failOnRisky` makes the test suite fail if any tests are marked as "risky".

Bug: T428716
@outdooracorn outdooracorn force-pushed the prevent-output-in-phpunit-tests branch from ac08b0e to 37bfb28 Compare June 21, 2026 16:05
@outdooracorn outdooracorn changed the base branch from main to refactor-phpunit-config June 21, 2026 16:14
@outdooracorn

Copy link
Copy Markdown
Member Author

The base needs to be changed back to main before merging this PR (but after #1158 has been merged)

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.

2 participants