Issue #2933991 by alexpott, neclimdul: Deprecation tests fail when all PHPUnit tests are run via PHPUnit