Currently, core tests cannot be run by running the phpunit command directly. Instead, we have a custom entrypoint that wraps PHPUnit and calls it programmatically from tests/phpunit/phpunit.php.
We should convert all our logic in the wrapper to a PHPUnit bootstrap file, so that we (and other automated tools) can start PHPUnit through the regular entry point.