stable

Clone or download

Read-only

[tech] Refactoring errors collectors in multiple objects

This is part of story #21386 dry run REST project creation XML and REST errors are almost identical but have a few differences (for instances with trove cats or custom project fields). They have to be handled differently. To do this, the checker has been splitted into multiple objects and collections to ease the customization of the project registration checks. In this patch, only a technical refactoring was done. No functional change is expected. Change-Id: Id9feafc79d00051a73ad8ba78a49125012a97a58

Modified Files

Name
M src/common/Project/ProjectCreator.class.php +26 −9 Go to diff View file
M src/common/Project/REST/v1/ProjectResource.class.php +17 −6 Go to diff View file
A src/common/Project/Registration/ProjectRegistrationBaseChecker.php +72 −0 Go to diff View file
M src/common/Project/Registration/ProjectRegistrationChecker.php +2 −58 Go to diff View file
A src/common/Project/Registration/ProjectRegistrationCheckerAggregator.php +54 −0 Go to diff View file
A src/common/Project/Registration/ProjectRegistrationCheckerBlockErrorSet.php +54 −0 Go to diff View file
A src/common/Project/Registration/ProjectRegistrationPermissionsChecker.php +52 −0 Go to diff View file
A src/common/Project/Registration/ProjectRegistrationRESTChecker.php +35 −0 Go to diff View file
A src/common/Project/Registration/ProjectRegistrationXMLChecker.php +35 −0 Go to diff View file
M src/common/layout/NewDropdown/NewDropdownPresenterBuilder.php +11 −13 Go to diff View file
M src/themes/BurningParrot/include/BurningParrotTheme.php +2 −4 Go to diff View file
M src/www/themes/FlamingParrot/FlamingParrot_Theme.class.php +3 −5 Go to diff View file
R tests/unit/common/Project/Registration/ProjectRegistrationCheckerTest.php Go to diff View file
A tests/unit/common/Project/Registration/ProjectRegistrationCheckerAggregatorTest.php +139 −0 Go to diff View file
A tests/unit/common/Project/Registration/ProjectRegistrationCheckerBlockErrorSetTest.php +139 −0 Go to diff View file
A tests/unit/common/Project/Registration/ProjectRegistrationPermissionsCheckerTest.php +105 −0 Go to diff View file
M tests/unit/common/layout/NewDropdown/NewDropdownPresenterBuilderTest.php +61 −71 Go to diff View file