stable

Clone or download

Read-only

refactor: Extract user registration in dedicated objects

In order to have better responsibilities and better test coverage, processing of user registration form is extracted in smaller dedicated objects. Suggested starting point for the review: src/common/User/Account/Register/RegisterFormProcessor.php No functional changes in user registration. Part of request #29614: Invited users shouldn't be mandated to re-confirm their email Change-Id: I027b08a1657a5914635bb90912b89c811fd44635

Modified Files

Name
M plugins/ldap/include/LDAP_UserManager.class.php +1 −1 Go to diff View file
M src/common/Request/RouteCollector.php +13 −7 Go to diff View file
A src/common/User/Account/Register/AfterSuccessfulUserRegistration.php +125 −0 Go to diff View file
A src/common/User/Account/Register/AfterSuccessfulUserRegistrationHandler.php +38 −0 Go to diff View file
A src/common/User/Account/Register/ConfirmationPageDisplayer.php +95 −0 Go to diff View file
A src/common/User/Account/Register/IDisplayConfirmationPage.php +36 −0 Go to diff View file
M src/common/User/Account/Register/IDisplayRegisterForm.php +7 −0 Go to diff View file
A src/common/User/Account/Register/IValidateFormAndCreateUser.php +34 −0 Go to diff View file
M src/common/User/Account/Register/RegisterFormHandler.php +1 −1 Go to diff View file
M src/common/User/Account/Register/RegisterFormProcessor.php +12 −157 Go to diff View file
A src/common/User/IGenerateMailConfirmationCode.php +28 −0 Go to diff View file
M src/common/User/MailConfirmationCodeGenerator.class.php +5 −13 Go to diff View file
A tests/unit/common/User/Account/Register/AfterSuccessfulUserRegistrationHandlerStub.php +56 −0 Go to diff View file
A tests/unit/common/User/Account/Register/AfterSuccessfulUserRegistrationTest.php +210 −0 Go to diff View file
A tests/unit/common/User/Account/Register/IDisplayConfirmationPageStub.php +82 −0 Go to diff View file
M tests/unit/common/User/Account/Register/IDisplayRegisterFormStub.php +22 −8 Go to diff View file
A tests/unit/common/User/Account/Register/IValidateFormAndCreateUserStub.php +54 −0 Go to diff View file
A tests/unit/common/User/Account/Register/RegisterFormProcessorTest.php +76 −0 Go to diff View file
A tests/unit/common/User/IGenerateMailConfirmationCodeStub.php +43 −0 Go to diff View file