diff --git a/.drone.yml b/.drone.yml index 579b006..2a31c8b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,11 +8,11 @@ trigger: steps: - - name: app-image + - name: coverage-image image: plugins/docker settings: - dockerfile: ./Code/Dockerfile - context: ./Code/Source + dockerfile: ./Source/Tests/Dockerfile + context: Source/Tests registry: hub.codefirst.iut.uca.fr repo: hub.codefirst.iut.uca.fr/dorian.hodin/sae4.01_formulaire username: @@ -20,16 +20,16 @@ steps: password: from_secret: SECRET_PASSWD - # conteneur deployment - - name: deploy-app + #conteneur deployment + - name: deploy_coverage image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest environment: IMAGENAME: hub.codefirst.iut.uca.fr/dorian.hodin/sae4.01_formulaire:latest - CONTAINERNAME: deploy-app + CONTAINERNAME: coverage-image COMMAND: create OVERWRITE: true ADMINS: dorianhodin,alexislamande,baptistebaverel,johanlachenal - depends_on: [ app-image ] + depends_on: [ coverage-image ] - name: setup_PHP_for_SonarQube diff --git a/.gitignore b/.gitignore index 44d2e92..c1830a5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -/Code/Source/Config/vendor/ -/Code/Source/.phpunit.cache/ +/Source/.phpunit.cache/ +/Source/Config/vendor/ diff --git a/Code/Dockerfile b/Code/Dockerfile deleted file mode 100644 index 7adf674..0000000 --- a/Code/Dockerfile +++ /dev/null @@ -1,9 +0,0 @@ -FROM php:8.1-apache -RUN apt-get upgrade -y && apt-get update -y && apt-get install -y git zip -COPY ./Source /var/www/html -WORKDIR /var/www/html/Config -RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -RUN composer update && composer install --prefer-source ../. -WORKDIR /var/www/html -RUN Config/vendor/bin/phpunit .\Tests --coverage-clover coverage.xml - diff --git a/Code/Source/.htaccess b/Source/.htaccess similarity index 100% rename from Code/Source/.htaccess rename to Source/.htaccess diff --git a/Code/Source/BusinessClass/BoxQuestion.php b/Source/BusinessClass/BoxQuestion.php similarity index 100% rename from Code/Source/BusinessClass/BoxQuestion.php rename to Source/BusinessClass/BoxQuestion.php diff --git a/Code/Source/BusinessClass/CheckBoxQuestion.php b/Source/BusinessClass/CheckBoxQuestion.php similarity index 100% rename from Code/Source/BusinessClass/CheckBoxQuestion.php rename to Source/BusinessClass/CheckBoxQuestion.php diff --git a/Code/Source/BusinessClass/Form.php b/Source/BusinessClass/Form.php similarity index 100% rename from Code/Source/BusinessClass/Form.php rename to Source/BusinessClass/Form.php diff --git a/Code/Source/BusinessClass/IPrintQuestionStrategy.php b/Source/BusinessClass/IPrintQuestionStrategy.php similarity index 100% rename from Code/Source/BusinessClass/IPrintQuestionStrategy.php rename to Source/BusinessClass/IPrintQuestionStrategy.php diff --git a/Code/Source/BusinessClass/Keyword.php b/Source/BusinessClass/Keyword.php similarity index 100% rename from Code/Source/BusinessClass/Keyword.php rename to Source/BusinessClass/Keyword.php diff --git a/Code/Source/BusinessClass/ListBoxQuestion.php b/Source/BusinessClass/ListBoxQuestion.php similarity index 100% rename from Code/Source/BusinessClass/ListBoxQuestion.php rename to Source/BusinessClass/ListBoxQuestion.php diff --git a/Code/Source/BusinessClass/Question.php b/Source/BusinessClass/Question.php similarity index 100% rename from Code/Source/BusinessClass/Question.php rename to Source/BusinessClass/Question.php diff --git a/Code/Source/BusinessClass/Response.php b/Source/BusinessClass/Response.php similarity index 100% rename from Code/Source/BusinessClass/Response.php rename to Source/BusinessClass/Response.php diff --git a/Code/Source/BusinessClass/TextQuestion.php b/Source/BusinessClass/TextQuestion.php similarity index 100% rename from Code/Source/BusinessClass/TextQuestion.php rename to Source/BusinessClass/TextQuestion.php diff --git a/Code/Source/Config/AltoRouter.php b/Source/Config/AltoRouter.php similarity index 100% rename from Code/Source/Config/AltoRouter.php rename to Source/Config/AltoRouter.php diff --git a/Code/Source/Config/Autoload.php b/Source/Config/Autoload.php similarity index 100% rename from Code/Source/Config/Autoload.php rename to Source/Config/Autoload.php diff --git a/Code/Source/Config/Clean.php b/Source/Config/Clean.php similarity index 100% rename from Code/Source/Config/Clean.php rename to Source/Config/Clean.php diff --git a/Code/Source/Config/SplClassLoader.php b/Source/Config/SplClassLoader.php similarity index 100% rename from Code/Source/Config/SplClassLoader.php rename to Source/Config/SplClassLoader.php diff --git a/Code/Source/Config/Validate.php b/Source/Config/Validate.php similarity index 100% rename from Code/Source/Config/Validate.php rename to Source/Config/Validate.php diff --git a/Code/Source/Config/composer.json b/Source/Config/composer.json similarity index 100% rename from Code/Source/Config/composer.json rename to Source/Config/composer.json diff --git a/Code/Source/Config/composer.lock b/Source/Config/composer.lock similarity index 99% rename from Code/Source/Config/composer.lock rename to Source/Config/composer.lock index dac9e48..569103b 100644 --- a/Code/Source/Config/composer.lock +++ b/Source/Config/composer.lock @@ -1343,16 +1343,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.0.16", + "version": "10.0.17", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "07d386a11ac7094032900f07cada1c8975d16607" + "reference": "b75eddcabca052312ae38c8a2bc69ff1a7b89b77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/07d386a11ac7094032900f07cada1c8975d16607", - "reference": "07d386a11ac7094032900f07cada1c8975d16607", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b75eddcabca052312ae38c8a2bc69ff1a7b89b77", + "reference": "b75eddcabca052312ae38c8a2bc69ff1a7b89b77", "shasum": "" }, "require": { @@ -1423,7 +1423,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.0.16" + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.0.17" }, "funding": [ { @@ -1439,7 +1440,7 @@ "type": "tidelift" } ], - "time": "2023-03-13T09:02:40+00:00" + "time": "2023-03-20T14:42:33+00:00" }, { "name": "sebastian/cli-parser", diff --git a/Code/Source/Config/config.php b/Source/Config/config.php similarity index 100% rename from Code/Source/Config/config.php rename to Source/Config/config.php diff --git a/Code/Source/Controller/ControllerAdmin.php b/Source/Controller/ControllerAdmin.php similarity index 100% rename from Code/Source/Controller/ControllerAdmin.php rename to Source/Controller/ControllerAdmin.php diff --git a/Code/Source/Controller/ControllerCandidate.php b/Source/Controller/ControllerCandidate.php similarity index 100% rename from Code/Source/Controller/ControllerCandidate.php rename to Source/Controller/ControllerCandidate.php diff --git a/Code/Source/Controller/FrontController.php b/Source/Controller/FrontController.php similarity index 100% rename from Code/Source/Controller/FrontController.php rename to Source/Controller/FrontController.php diff --git a/Code/Source/Exceptions/InexistantLoginException.php b/Source/Exceptions/InexistantLoginException.php similarity index 100% rename from Code/Source/Exceptions/InexistantLoginException.php rename to Source/Exceptions/InexistantLoginException.php diff --git a/Code/Source/Exceptions/InvalidLoginOrPasswordException.php b/Source/Exceptions/InvalidLoginOrPasswordException.php similarity index 100% rename from Code/Source/Exceptions/InvalidLoginOrPasswordException.php rename to Source/Exceptions/InvalidLoginOrPasswordException.php diff --git a/Code/Source/Exceptions/InvalidUsernameOrPasswordException.php b/Source/Exceptions/InvalidUsernameOrPasswordException.php similarity index 100% rename from Code/Source/Exceptions/InvalidUsernameOrPasswordException.php rename to Source/Exceptions/InvalidUsernameOrPasswordException.php diff --git a/Code/Source/Model/Factory.php b/Source/Model/Factory.php similarity index 100% rename from Code/Source/Model/Factory.php rename to Source/Model/Factory.php diff --git a/Code/Source/Model/FactoryQuestion.php b/Source/Model/FactoryQuestion.php similarity index 100% rename from Code/Source/Model/FactoryQuestion.php rename to Source/Model/FactoryQuestion.php diff --git a/Code/Source/Model/ModelAdmin.php b/Source/Model/ModelAdmin.php similarity index 100% rename from Code/Source/Model/ModelAdmin.php rename to Source/Model/ModelAdmin.php diff --git a/Code/Source/Model/ModelCandidate.php b/Source/Model/ModelCandidate.php similarity index 100% rename from Code/Source/Model/ModelCandidate.php rename to Source/Model/ModelCandidate.php diff --git a/Source/Tests/Dockerfile b/Source/Tests/Dockerfile new file mode 100644 index 0000000..bb8b96a --- /dev/null +++ b/Source/Tests/Dockerfile @@ -0,0 +1,2 @@ +FROM php:8.1-apache +COPY ./coverage.xml /var/www/html \ No newline at end of file diff --git a/Code/Source/Tests/TestBusinessClass/BoxQuestionTest.php b/Source/Tests/TestBusinessClass/BoxQuestionTest.php similarity index 100% rename from Code/Source/Tests/TestBusinessClass/BoxQuestionTest.php rename to Source/Tests/TestBusinessClass/BoxQuestionTest.php diff --git a/Code/Source/Tests/TestBusinessClass/FormTest.php b/Source/Tests/TestBusinessClass/FormTest.php similarity index 100% rename from Code/Source/Tests/TestBusinessClass/FormTest.php rename to Source/Tests/TestBusinessClass/FormTest.php diff --git a/Code/Source/Tests/TestBusinessClass/IPrintQuestionStrategyTest.php b/Source/Tests/TestBusinessClass/IPrintQuestionStrategyTest.php similarity index 100% rename from Code/Source/Tests/TestBusinessClass/IPrintQuestionStrategyTest.php rename to Source/Tests/TestBusinessClass/IPrintQuestionStrategyTest.php diff --git a/Code/Source/Tests/TestBusinessClass/KeywordTest.php b/Source/Tests/TestBusinessClass/KeywordTest.php similarity index 100% rename from Code/Source/Tests/TestBusinessClass/KeywordTest.php rename to Source/Tests/TestBusinessClass/KeywordTest.php diff --git a/Code/Source/Tests/TestBusinessClass/QuestionTest.php b/Source/Tests/TestBusinessClass/QuestionTest.php similarity index 100% rename from Code/Source/Tests/TestBusinessClass/QuestionTest.php rename to Source/Tests/TestBusinessClass/QuestionTest.php diff --git a/Code/Source/Tests/TestBusinessClass/ResponseTest.php b/Source/Tests/TestBusinessClass/ResponseTest.php similarity index 100% rename from Code/Source/Tests/TestBusinessClass/ResponseTest.php rename to Source/Tests/TestBusinessClass/ResponseTest.php diff --git a/Code/Source/Tests/TestBusinessClass/TextQuestionTest.php b/Source/Tests/TestBusinessClass/TextQuestionTest.php similarity index 100% rename from Code/Source/Tests/TestBusinessClass/TextQuestionTest.php rename to Source/Tests/TestBusinessClass/TextQuestionTest.php diff --git a/Code/Source/Tests/TestConfig/AltoRouterTest.php b/Source/Tests/TestConfig/AltoRouterTest.php similarity index 100% rename from Code/Source/Tests/TestConfig/AltoRouterTest.php rename to Source/Tests/TestConfig/AltoRouterTest.php diff --git a/Code/Source/Tests/TestConfig/AutoloadTest.php b/Source/Tests/TestConfig/AutoloadTest.php similarity index 100% rename from Code/Source/Tests/TestConfig/AutoloadTest.php rename to Source/Tests/TestConfig/AutoloadTest.php diff --git a/Code/Source/Tests/TestConfig/CleanTest.php b/Source/Tests/TestConfig/CleanTest.php similarity index 100% rename from Code/Source/Tests/TestConfig/CleanTest.php rename to Source/Tests/TestConfig/CleanTest.php diff --git a/Code/Source/Tests/TestConfig/ValidateTest.php b/Source/Tests/TestConfig/ValidateTest.php similarity index 100% rename from Code/Source/Tests/TestConfig/ValidateTest.php rename to Source/Tests/TestConfig/ValidateTest.php diff --git a/Code/Source/Tests/TestException/InexistantLoginExceptionTest.php b/Source/Tests/TestException/InexistantLoginExceptionTest.php similarity index 100% rename from Code/Source/Tests/TestException/InexistantLoginExceptionTest.php rename to Source/Tests/TestException/InexistantLoginExceptionTest.php diff --git a/Code/Source/Tests/TestException/InvalidLoginOrPasswordExceptionTest.php b/Source/Tests/TestException/InvalidLoginOrPasswordExceptionTest.php similarity index 100% rename from Code/Source/Tests/TestException/InvalidLoginOrPasswordExceptionTest.php rename to Source/Tests/TestException/InvalidLoginOrPasswordExceptionTest.php diff --git a/Code/Source/Tests/TestException/InvalidUsernameOrPasswordExceptionTest.php b/Source/Tests/TestException/InvalidUsernameOrPasswordExceptionTest.php similarity index 100% rename from Code/Source/Tests/TestException/InvalidUsernameOrPasswordExceptionTest.php rename to Source/Tests/TestException/InvalidUsernameOrPasswordExceptionTest.php diff --git a/Code/Source/Tests/TestModel/.gitkeep b/Source/Tests/TestModel/.gitkeep similarity index 100% rename from Code/Source/Tests/TestModel/.gitkeep rename to Source/Tests/TestModel/.gitkeep diff --git a/Code/Source/Views/CSS/adminLogin.css b/Source/Views/CSS/adminLogin.css similarity index 100% rename from Code/Source/Views/CSS/adminLogin.css rename to Source/Views/CSS/adminLogin.css diff --git a/Code/Source/Views/CSS/base.css b/Source/Views/CSS/base.css similarity index 100% rename from Code/Source/Views/CSS/base.css rename to Source/Views/CSS/base.css diff --git a/Code/Source/Views/CSS/form.css b/Source/Views/CSS/form.css similarity index 100% rename from Code/Source/Views/CSS/form.css rename to Source/Views/CSS/form.css diff --git a/Code/Source/Views/CSS/styles.css b/Source/Views/CSS/styles.css similarity index 100% rename from Code/Source/Views/CSS/styles.css rename to Source/Views/CSS/styles.css diff --git a/Code/Source/Views/CSS/stylesForm.css b/Source/Views/CSS/stylesForm.css similarity index 100% rename from Code/Source/Views/CSS/stylesForm.css rename to Source/Views/CSS/stylesForm.css diff --git a/Code/Source/Views/HTML/admin.php b/Source/Views/HTML/admin.php similarity index 100% rename from Code/Source/Views/HTML/admin.php rename to Source/Views/HTML/admin.php diff --git a/Code/Source/Views/HTML/adminLogin.php b/Source/Views/HTML/adminLogin.php similarity index 100% rename from Code/Source/Views/HTML/adminLogin.php rename to Source/Views/HTML/adminLogin.php diff --git a/Code/Source/Views/HTML/categories.php b/Source/Views/HTML/categories.php similarity index 100% rename from Code/Source/Views/HTML/categories.php rename to Source/Views/HTML/categories.php diff --git a/Code/Source/Views/HTML/continue.php b/Source/Views/HTML/continue.php similarity index 100% rename from Code/Source/Views/HTML/continue.php rename to Source/Views/HTML/continue.php diff --git a/Code/Source/Views/HTML/error.php b/Source/Views/HTML/error.php similarity index 100% rename from Code/Source/Views/HTML/error.php rename to Source/Views/HTML/error.php diff --git a/Code/Source/Views/HTML/form.php b/Source/Views/HTML/form.php similarity index 100% rename from Code/Source/Views/HTML/form.php rename to Source/Views/HTML/form.php diff --git a/Code/Source/Views/HTML/possibleResponsesForm.php b/Source/Views/HTML/possibleResponsesForm.php similarity index 100% rename from Code/Source/Views/HTML/possibleResponsesForm.php rename to Source/Views/HTML/possibleResponsesForm.php diff --git a/Code/Source/Views/HTML/questions.php b/Source/Views/HTML/questions.php similarity index 100% rename from Code/Source/Views/HTML/questions.php rename to Source/Views/HTML/questions.php diff --git a/Code/Source/Views/HTML/responses.php b/Source/Views/HTML/responses.php similarity index 100% rename from Code/Source/Views/HTML/responses.php rename to Source/Views/HTML/responses.php diff --git a/Code/Source/Views/HTML/thanks.php b/Source/Views/HTML/thanks.php similarity index 100% rename from Code/Source/Views/HTML/thanks.php rename to Source/Views/HTML/thanks.php diff --git a/Code/Source/Views/IMAGES/background_uca.png b/Source/Views/IMAGES/background_uca.png similarity index 100% rename from Code/Source/Views/IMAGES/background_uca.png rename to Source/Views/IMAGES/background_uca.png diff --git a/Code/Source/Views/IMAGES/logoUca.png b/Source/Views/IMAGES/logoUca.png similarity index 100% rename from Code/Source/Views/IMAGES/logoUca.png rename to Source/Views/IMAGES/logoUca.png diff --git a/Code/Source/Views/JS/constant.js b/Source/Views/JS/constant.js similarity index 100% rename from Code/Source/Views/JS/constant.js rename to Source/Views/JS/constant.js diff --git a/Code/Source/Views/JS/form_category.js b/Source/Views/JS/form_category.js similarity index 100% rename from Code/Source/Views/JS/form_category.js rename to Source/Views/JS/form_category.js diff --git a/Code/Source/Views/JS/form_question.js b/Source/Views/JS/form_question.js similarity index 100% rename from Code/Source/Views/JS/form_question.js rename to Source/Views/JS/form_question.js diff --git a/Code/Source/Views/JS/getData-Ids.js b/Source/Views/JS/getData-Ids.js similarity index 100% rename from Code/Source/Views/JS/getData-Ids.js rename to Source/Views/JS/getData-Ids.js diff --git a/Code/Source/Views/JS/possibleResponses.js b/Source/Views/JS/possibleResponses.js similarity index 100% rename from Code/Source/Views/JS/possibleResponses.js rename to Source/Views/JS/possibleResponses.js diff --git a/Code/Source/Views/JS/scripts.js b/Source/Views/JS/scripts.js similarity index 100% rename from Code/Source/Views/JS/scripts.js rename to Source/Views/JS/scripts.js diff --git a/Code/Source/index.php b/Source/index.php similarity index 100% rename from Code/Source/index.php rename to Source/index.php diff --git a/Code/Source/phpunit.xml b/Source/phpunit.xml similarity index 100% rename from Code/Source/phpunit.xml rename to Source/phpunit.xml