Follow up from T225248, this is a proposal to use PHPUnit's --stop-on-failure and Mocha's [bail](https://mochajs.org/api/mocha) configuration option to end PHPUnit and Selenium test runs early if there's a failure.
The advantages are:
- reduced CI resources as we don't need to wait for a 20-30 minute build if we know it's going to fail anyway
- a little less impact of flaky tests as "recheck" can be started sooner