Context
PR #250 unblocked PHPUnit CI by marking three unit-test files skipped — the classes under test have all been refactored since the tests were written, so the existing test expectations no longer match the production code paths.
Files
tests/Unit/EventListener/SoftwareCatalogEventListenerTest.php — SoftwareCatalogEventListener::handle() now dispatches via handleObjectCreated / handleObjectUpdated / handleObjectDeleted private methods, each resolving schema IDs via SettingsService and then calling the appropriate service method. Tests still assert the old handleNewContact / handleNewGebruiker / etc. direct service calls.
tests/Unit/OrganisationUserWorkflowTest.php — ContactpersonenController's dependency surface has grown (additional collaborators) and ContactPersonHandler now has findByUuid and other methods the tests' mocks don't declare.
tests/Unit/Service/ContactPersonHandlerTest.php — addUserToGroupWithCheck etc. now call IUserManager::get twice (lookup + verify) and the dependency surface includes new collaborators.
Re-do scope
For each file:
- Read the current production code carefully.
- Inventory current public methods + collaborators.
- Rewrite tests against the new dispatch flow / call sequencing.
- Remove the
markTestSkipped shim from setUp.
Aim for the same coverage intent as the original tests (event routing, contact-conversion workflow, user-group membership management).
Tracked per user feedback rule 'Always file issues for deferred work'.
Context
PR #250 unblocked PHPUnit CI by marking three unit-test files skipped — the classes under test have all been refactored since the tests were written, so the existing test expectations no longer match the production code paths.
Files
tests/Unit/EventListener/SoftwareCatalogEventListenerTest.php—SoftwareCatalogEventListener::handle()now dispatches viahandleObjectCreated/handleObjectUpdated/handleObjectDeletedprivate methods, each resolving schema IDs viaSettingsServiceand then calling the appropriate service method. Tests still assert the oldhandleNewContact/handleNewGebruiker/ etc. direct service calls.tests/Unit/OrganisationUserWorkflowTest.php—ContactpersonenController's dependency surface has grown (additional collaborators) andContactPersonHandlernow hasfindByUuidand other methods the tests' mocks don't declare.tests/Unit/Service/ContactPersonHandlerTest.php—addUserToGroupWithChecketc. now callIUserManager::gettwice (lookup + verify) and the dependency surface includes new collaborators.Re-do scope
For each file:
markTestSkippedshim fromsetUp.Aim for the same coverage intent as the original tests (event routing, contact-conversion workflow, user-group membership management).
Tracked per user feedback rule 'Always file issues for deferred work'.