[Test Framework] - Tests for report downloads #17892
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This is similar to the mail_report job tests in api/v3/JobTest, but it's for when you choose to export from the civireport actions dropdown. This tests that it does export the expected content, at least in the requested format since comparing the actual rows in something like a pdf is hard.
Before
Works
After
Works
Technical Details
I'm 50/50 on the use of runInSeparateProcess for the pdf one, but otherwise it complains about headers already being sent which is coming from dompdf. The same problem doesn't happen with csv because it calls a helper function which just calls the CMS to spool headers, and it doesn't get output until civiExit().
Comments
Is test.