stable

Clone or download

Read-only

[refacto]Move route POST project_files into POST project

part of story #36484 create a new project from an XML template Why merging route? Previous architecture was weird, uploading a file is conceptually the same thing than creating a project from an xml template the route POST should handle the creation of the project, we need to merge the two routes How to test use route POST projects with a from archive key: { "file_name": "test.zip", "file_size": 599 } route will return you the file_upload link Change-Id: I0eea9b45c7dd73fe52ecc93447d70a3b9aa814f6

Modified Files

Name
M src/common/Project/ProjectCreationData.php +10 −0 Go to diff View file
M src/common/Project/ProjectCreator.class.php +42 −40 Go to diff View file
A src/common/Project/REST/v1/Project/PostProjectCreated.php +61 −0 Go to diff View file
M src/common/Project/REST/v1/Project/ProjectCreationDataPOSTProjectBuilder.php +104 −90 Go to diff View file
A src/common/Project/REST/v1/Project/ProjectRepresentationBuilder.php +107 −0 Go to diff View file
D src/common/Project/REST/v1/ProjectFileResource.php +0 −109 Go to diff View file
M src/common/Project/REST/v1/ProjectPostRepresentation.php +5 −0 Go to diff View file
M src/common/Project/REST/v1/ProjectResource.class.php +42 −85 Go to diff View file
M src/common/Project/REST/v1/RestProjectCreator.php +41 −37 Go to diff View file
M src/common/Project/Registration/Template/TemplateFromProjectForCreation.php +1 −8 Go to diff View file
M src/common/REST/ResourcesInjector.class.php +1 −6 Go to diff View file
R tests/unit/common/Project/Registration/CheckProjectRegistrationUserPermissionStub.php Go to diff View file
A tests/lib/Stubs/Project/Registration/ProjectRegistrationCheckerStub.php +55 −0 Go to diff View file
D tests/rest/tests/Project/ProjectFileResourceTest.php +0 −47 Go to diff View file
M tests/rest/tests/ProjectTest.php +28 −3 Go to diff View file
M tests/unit/common/Project/ProjectCreationDataTest.php +14 −0 Go to diff View file
M tests/unit/common/Project/REST/v1/ProjectCreationDataPOSTProjectBuilderTest.php +32 −0 Go to diff View file
M tests/unit/common/Project/REST/v1/RestProjectCreatorTest.php +129 −37 Go to diff View file
M tests/unit/common/Project/Registration/Template/Upload/Tus/ProjectFileBeingUploadedInformationProviderTest.php +1 −1 Go to diff View file