diff --git a/.travis.yml b/.travis.yml index 9e33852b..f54e3358 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ install: script: - mkdir build - - composer check + - composer ci after_success: - rm -f build/clover.xml diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ac60d4b..24ecb700 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to this project will be documented in this file. -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org). +The format is based on [Keep a Changelog](https://keepachangelog.com), and this project adheres to [Semantic Versioning](https://semver.org). ## [Unreleased] diff --git a/composer.json b/composer.json index c3257a7d..d78860a1 100644 --- a/composer.json +++ b/composer.json @@ -80,26 +80,22 @@ "ShlinkioTest\\Shlink\\Rest\\": "module/Rest/test", "ShlinkioTest\\Shlink\\Core\\": [ "module/Core/test", - "module/Core/test-func" + "module/Core/test-db" ], "ShlinkioTest\\Shlink\\Common\\": [ "module/Common/test", - "module/Common/test-func" + "module/Common/test-db" ], "ShlinkioTest\\Shlink\\Installer\\": "module/Installer/test" } }, "scripts": { - "check": [ + "ci": [ "@cs", "@stan", "@test:ci", "@infect:ci" ], - "ci": [ - "echo \"This command is DEPRECATED. Use check instead\"", - "@check" - ], "cs": "phpcs", "cs:fix": "phpcbf", @@ -107,15 +103,15 @@ "test": [ "@test:unit", - "@test:func" + "@test:db" ], "test:ci": [ "@test:unit:ci", - "@test:func" + "@test:db" ], "test:unit": "phpdbg -qrr vendor/bin/phpunit --order-by=random --coverage-php build/coverage-unit.cov", "test:unit:ci": "phpdbg -qrr vendor/bin/phpunit --order-by=random --coverage-php build/coverage-unit.cov --coverage-clover=build/clover.xml --coverage-xml=build/coverage-xml --log-junit=build/phpunit.junit.xml", - "test:func": "phpdbg -qrr vendor/bin/phpunit --order-by=random -c phpunit-func.xml --coverage-php build/coverage-func.cov", + "test:db": "phpdbg -qrr vendor/bin/phpunit --order-by=random -c phpunit-db.xml --coverage-php build/coverage-db.cov", "test:pretty": [ "@test", @@ -123,9 +119,9 @@ ], "test:unit:pretty": "phpdbg -qrr vendor/bin/phpunit --coverage-html build/coverage --order-by=random", - "infect": "infection --threads=4 --min-msi=65 --log-verbosity=2 --only-covered", - "infect:ci": "infection --threads=4 --min-msi=65 --log-verbosity=2 --only-covered --coverage=build", - "infect:show": "infection --threads=4 --min-msi=65 --log-verbosity=2 --only-covered --show-mutations", + "infect": "infection --threads=4 --min-msi=65 --log-verbosity=default --only-covered", + "infect:ci": "infection --threads=4 --min-msi=65 --log-verbosity=default --only-covered --coverage=build", + "infect:show": "infection --threads=4 --min-msi=65 --log-verbosity=default --only-covered --show-mutations", "infect:test": [ "@test:unit:ci", "@infect:ci" @@ -141,7 +137,7 @@ "test:ci": "Runs all test suites, generating all needed reports and logs for CI envs", "test:unit": "Runs unit test suites", "test:unit:ci": "Runs unit test suites, generating all needed reports and logs for CI envs", - "test:func": "Runs functional test suites (covering entity repositories)", + "test:db": "Runs database test suites (covering entity repositories)", "test:pretty": "Runs all test suites and generates an HTML code coverage report", "test:unit:pretty": "Runs unit test suites and generates an HTML code coverage report", "infect": "Checks unit tests quality applying mutation testing", diff --git a/func_tests_bootstrap.php b/db_tests_bootstrap.php similarity index 100% rename from func_tests_bootstrap.php rename to db_tests_bootstrap.php diff --git a/module/Common/test-func/DbUnit/DatabaseTestCase.php b/module/Common/test-db/DbUnit/DatabaseTestCase.php similarity index 100% rename from module/Common/test-func/DbUnit/DatabaseTestCase.php rename to module/Common/test-db/DbUnit/DatabaseTestCase.php diff --git a/module/Core/test-func/Repository/ShortUrlRepositoryTest.php b/module/Core/test-db/Repository/ShortUrlRepositoryTest.php similarity index 100% rename from module/Core/test-func/Repository/ShortUrlRepositoryTest.php rename to module/Core/test-db/Repository/ShortUrlRepositoryTest.php diff --git a/module/Core/test-func/Repository/TagRepositoryTest.php b/module/Core/test-db/Repository/TagRepositoryTest.php similarity index 100% rename from module/Core/test-func/Repository/TagRepositoryTest.php rename to module/Core/test-db/Repository/TagRepositoryTest.php diff --git a/module/Core/test-func/Repository/VisitRepositoryTest.php b/module/Core/test-db/Repository/VisitRepositoryTest.php similarity index 100% rename from module/Core/test-func/Repository/VisitRepositoryTest.php rename to module/Core/test-db/Repository/VisitRepositoryTest.php diff --git a/phpunit-func.xml b/phpunit-db.xml similarity index 78% rename from phpunit-func.xml rename to phpunit-db.xml index f06c11ee..f514afd9 100644 --- a/phpunit-func.xml +++ b/phpunit-db.xml @@ -2,11 +2,11 @@ - - ./module/*/test-func + + ./module/*/test-db