Create a `Backend` for tests with custom stub class index. This allows tests to inject minimal stub content (e.g. `UnitEnum`, `BackedEnum`) without depending on `composer install` having been run.
(stub_index: HashMap<&'static str, &'static str>)
| 831 | /// This allows tests to inject minimal stub content (e.g. `UnitEnum`, |
| 832 | /// `BackedEnum`) without depending on `composer install` having been run. |
| 833 | pub fn new_test_with_stubs(stub_index: HashMap<&'static str, &'static str>) -> Self { |
| 834 | virtual_members::phpdoc::clear_mixin_cache(); |
| 835 | let backend = Self { |
| 836 | stub_index: RwLock::new(stub_index), |
| 837 | ..Self::test_defaults() |
| 838 | }; |
| 839 | backend.set_php_version(backend.php_version()); |
| 840 | backend |
| 841 | } |
| 842 | |
| 843 | /// Create a `Backend` for tests with custom class, function, and constant |
| 844 | /// stub indices. |
nothing calls this directly
no test coverage detected