From 233473d9156a6791dc63df4168b1d08363d0586b Mon Sep 17 00:00:00 2001 From: Meritoo Date: Mon, 28 May 2018 17:42:15 +0200 Subject: [PATCH] Tests > implement Codeception (instead of PHPUnit) --- .gitignore | 12 --------- .phing/properties.dist | 5 ++-- .phing/tests.xml | 8 +++--- codeception.yml | 22 ++++++++++++++++ composer.json | 2 +- phpunit.xml.dist | 54 ---------------------------------------- tests/_output/.gitignore | 2 ++ tests/_support/.gitkeep | 0 8 files changed, 30 insertions(+), 75 deletions(-) create mode 100644 codeception.yml delete mode 100644 phpunit.xml.dist create mode 100644 tests/_output/.gitignore create mode 100644 tests/_support/.gitkeep diff --git a/.gitignore b/.gitignore index 735ca31..bc4fe0a 100644 --- a/.gitignore +++ b/.gitignore @@ -23,24 +23,12 @@ /.phing/properties -# ---------------------------------------------------------------------------------------------------------------------- -### PHPUnit -# ---------------------------------------------------------------------------------------------------------------------- -/phpunit.xml - - # ---------------------------------------------------------------------------------------------------------------------- ### PHP Coding Standards Fixer generated files # ---------------------------------------------------------------------------------------------------------------------- /.php_cs.cache -# ---------------------------------------------------------------------------------------------------------------------- -### Build files -# ---------------------------------------------------------------------------------------------------------------------- -/.build/ - - # ---------------------------------------------------------------------------------------------------------------------- ### Generated databases # ---------------------------------------------------------------------------------------------------------------------- diff --git a/.phing/properties.dist b/.phing/properties.dist index b515716..e939825 100644 --- a/.phing/properties.dist +++ b/.phing/properties.dist @@ -76,7 +76,6 @@ dir.tests = ${project.basedir}/tests dir.build = ${project.basedir}/.build dir.reports = ${dir.build}/logs dir.reports.pdepend = ${dir.reports}/pdepend -dir.reports.coverage = ${dir.reports}/phpunit_coverage # # Disabled, because unnecessary right now # phpdocumentor/phpdocumentor cannot be installed via Composer @@ -97,9 +96,9 @@ dir.data.temporary = ${dir.data}/tmp # Testing # -------------------------------------------------------------------------------- -# Path of the PHPUnit +# Path of the framework used to run unit tests # -phpUnit.path = ./vendor/bin/phpunit +tests_framework.path = ./vendor/bin/codecept # Path of the PHP Coding Standards Fixer (http://cs.sensiolabs.org) # diff --git a/.phing/tests.xml b/.phing/tests.xml index 5cdd1da..243cb2e 100644 --- a/.phing/tests.xml +++ b/.phing/tests.xml @@ -87,7 +87,7 @@ @@ -103,7 +103,6 @@ - @@ -212,10 +211,9 @@ - + - + diff --git a/codeception.yml b/codeception.yml new file mode 100644 index 0000000..1883ff0 --- /dev/null +++ b/codeception.yml @@ -0,0 +1,22 @@ +namespace: 'Meritoo\Common\Test' +suites: + unit: + path: . +settings: + shuffle: true + lint: true +paths: + tests: tests + output: tests/_output + support: tests/_support + data: tests +coverage: + enabled: true + include: + - src/* + exclude: + - .data/* + - .docker/* + - .phing/* + - tests/* + - vendor/* diff --git a/composer.json b/composer.json index 10278cf..1dfe52a 100644 --- a/composer.json +++ b/composer.json @@ -17,11 +17,11 @@ "symfony/http-foundation": "^3.3" }, "require-dev": { + "codeception/codeception": "^2.4", "friendsofphp/php-cs-fixer": "^2.2", "pdepend/pdepend": "^2.5", "phploc/phploc": "^2.1", "phpmd/phpmd": "^2.6", - "phpunit/phpunit": "^4.8", "sebastian/phpcpd": "^2.0", "squizlabs/php_codesniffer": "^2.9" }, diff --git a/phpunit.xml.dist b/phpunit.xml.dist deleted file mode 100644 index ffd8beb..0000000 --- a/phpunit.xml.dist +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - ./tests/ - - - - - - ./src/ - - - - - - performance - - - - - - - diff --git a/tests/_output/.gitignore b/tests/_output/.gitignore new file mode 100644 index 0000000..c96a04f --- /dev/null +++ b/tests/_output/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file diff --git a/tests/_support/.gitkeep b/tests/_support/.gitkeep new file mode 100644 index 0000000..e69de29