As the title states.
Using phpunit, with selinium, headless chrome.
During unit tests, if any test fails, a screenshot is made of the issue. These are stores in a folder, which I want to upload to S3 bucket (as per existing guides), which would allow to see browser view at the point of test fail.
The issue I have is that teardown runs, after phpunit fails, which skips any further script actions.
I also tried to set the copy part as a second step, which also does not run.
So, is there a way to run steps/script actions prior/during teardown?