UnitTests - Tighten class-scanning for `civicrm-core:tests/phpunit`
authorTim Otten <totten@civicrm.org>
Tue, 23 Aug 2022 03:24:41 +0000 (20:24 -0700)
committerTim Otten <totten@civicrm.org>
Tue, 23 Aug 2022 03:57:21 +0000 (20:57 -0700)
commit4cd22a3cf838dfa6a274a11a2f884e8f0b0c7e88
tree471dcae531bb58f0096e3df95ba3c89165380b0d
parent2a172ce9287662a9b30664fba254ead788a9383e
UnitTests - Tighten class-scanning for `civicrm-core:tests/phpunit`

This addresses a bug where:

1. Class-scanning of `civicrm-core:tests/phpunit/*` works with core-test-suites
2. Class-scanning of `civicrm-core:tests/phpunit/*` fails with civiimport test-suite.

The difference is that core-tests setup class-loading for
`civicrm-core:tests/phpunit/`; `civimport` understandably doesn't.

Class-scanning is only viable if we regard the specific classes a loadable.

This further tightens it:

1. Since core-test-suites can load `civicrm-core:tests/phpunit/*`, they will scan it
2. Since civiimport test-suite cannot load it, it will not scan it.
Civi/Core/ClassScanner.php