From 78a1f9886ba48b13fb0341c048f1573758660114 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 6 Sep 2024 20:37:51 +0300 Subject: [PATCH] update testings --- .github/workflows/tests.yml | 47 +- Dockerfile | 7 +- README.md | 8 +- action.Dockerfile | 2 +- composer.json | 23 +- composer.lock | 669 +++++++++++++++++++++- infection.json5.dist | 19 + tests/Configuration/ConfigurationTest.php | 35 +- 8 files changed, 754 insertions(+), 56 deletions(-) create mode 100644 infection.json5.dist diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c9427c6..b69da09 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -41,8 +41,8 @@ jobs: php-version: ${{ matrix.php }} tools: composer:v2 coverage: none - - run: composer validate --strict --ansi - composer-require-checker: + - run: composer validate + composer-normalize: runs-on: ubuntu-latest strategy: matrix: @@ -60,8 +60,8 @@ jobs: - uses: ramsey/composer-install@v3 with: composer-options: --optimize-autoloader - - run: composer require-checker - composer-unused: + - run: composer normalize + composer-require-checker: runs-on: ubuntu-latest strategy: matrix: @@ -79,8 +79,8 @@ jobs: - uses: ramsey/composer-install@v3 with: composer-options: --optimize-autoloader - - run: composer unused - composer-normalize: + - run: composer require-checker + composer-unused: runs-on: ubuntu-latest strategy: matrix: @@ -98,8 +98,8 @@ jobs: - uses: ramsey/composer-install@v3 with: composer-options: --optimize-autoloader - - run: composer normalize --dry-run --diff --ansi - php-cs-fixer: + - run: composer unused + coding-standards: runs-on: ubuntu-latest strategy: matrix: @@ -117,8 +117,8 @@ jobs: - uses: ramsey/composer-install@v3 with: composer-options: --optimize-autoloader - - run: composer fixcs -- --dry-run --diff --format=checkstyle --ansi | cs2pr - rector: + - run: composer php-cs-fixer -- --dry-run --diff --format=checkstyle --ansi | cs2pr + refactoring: runs-on: ubuntu-latest strategy: matrix: @@ -137,7 +137,7 @@ jobs: with: composer-options: --optimize-autoloader - run: composer rector -- --dry-run - psalm: + static-analysis: runs-on: ubuntu-latest strategy: matrix: @@ -156,7 +156,7 @@ jobs: with: composer-options: --optimize-autoloader - run: composer psalm -- --php-version=${{ matrix.php }} --stats --output-format=github --shepherd - phpunit: + unit-tests: runs-on: ubuntu-latest strategy: matrix: @@ -170,9 +170,28 @@ jobs: with: php-version: ${{ matrix.php }} tools: composer:v2 - coverage: xdebug + coverage: pcov - uses: ramsey/composer-install@v3 with: composer-options: --optimize-autoloader # - run: composer test -- --colors=always --order-by=random --coverage-clover coverage.xml - - run: composer test -- --colors=always --order-by=random + - run: composer phpunit + mutation-tests: + runs-on: ubuntu-latest + strategy: + matrix: + php: + - 8.3 + steps: + - uses: actions/checkout@v4 + with: + ref: ${{env.BRANCH}} + - uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + tools: composer:v2 + coverage: pcov + - uses: ramsey/composer-install@v3 + with: + composer-options: --optimize-autoloader + - run: composer infection diff --git a/Dockerfile b/Dockerfile index 8b267fe..602c64a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,12 @@ -ARG PHP_VERSION=8.3.10-1 +ARG PHP_VERSION=8.3 FROM rosven9856/php:$PHP_VERSION +RUN apk add --update --no-cache --virtual .build-deps ${PHPIZE_DEPS} \ + && pecl install pcov \ + && docker-php-ext-enable pcov \ + && apk del .build-deps + RUN addgroup -g 1000 --system php RUN adduser -G php --system -D -s /bin/sh -u 1000 php diff --git a/README.md b/README.md index 707487e..b61c4d5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -

+

github gitea actions

@@ -50,7 +50,7 @@ The path to the compiled package archive build ```shell -docker build . --build-arg=PHP_VERSION=8.3.10-1 -t=composer-package-action +docker build . --build-arg=PHP_VERSION=8.3 -t=composer-package-action ``` initialization @@ -63,3 +63,7 @@ running docker run --rm -e GITHUB_WORKSPACE=/usr/bin/app -v .:/usr/bin/app composer-package-action php app.php ``` +testing +```shell +docker run --rm -e GITHUB_WORKSPACE=/usr/bin/app -v .:/usr/bin/app composer-package-action composer tests +``` diff --git a/action.Dockerfile b/action.Dockerfile index bd196cf..785f640 100644 --- a/action.Dockerfile +++ b/action.Dockerfile @@ -1,4 +1,4 @@ -ARG PHP_VERSION=8.3.10-1 +ARG PHP_VERSION=8.3 FROM rosven9856/php:$PHP_VERSION diff --git a/composer.json b/composer.json index 6611a2b..cd80eb0 100644 --- a/composer.json +++ b/composer.json @@ -17,6 +17,7 @@ "ergebnis/composer-normalize": "^2.42", "friendsofphp/php-cs-fixer": "^3.57", "icanhazstring/composer-unused": "^0.8.11", + "infection/infection": "^0.27.11", "maglnet/composer-require-checker": "^4.11", "phpunit/phpunit": "^10.4.2", "phpyh/coding-standard": "^2.6", @@ -39,15 +40,29 @@ "ergebnis/composer-normalize": true, "infection/extension-installer": true }, - "sort-packages": true + "sort-packages": true, + "sort-scripts": false }, "scripts": { - "fixcs": "php-cs-fixer fix --diff --verbose", "infection": "infection --threads=max --show-mutations", + "normalize": "composer normalize --dry-run --diff --ansi", + "php-cs-fixer": "php-cs-fixer fix --diff --verbose", + "phpunit": "phpunit --colors=always --order-by=random", "psalm": "psalm --show-info=true --no-diff", "rector": "rector process", "require-checker": "composer-require-checker check --config-file=composer-require-checker.json composer.json", - "test": "phpunit", - "unused": "composer-unused --excludePackage=ext-zip" + "tests": [ + "@validate", + "@normalize", + "@require-checker", + "@unused", + "composer php-cs-fixer -- --dry-run --diff --format=checkstyle --ansi", + "composer rector -- --dry-run", + "composer psalm -- --stats --shepherd", + "@phpunit", + "@infection" + ], + "unused": "composer-unused --excludePackage=ext-zip", + "validate": "composer validate --strict --ansi" } } diff --git a/composer.lock b/composer.lock index b313e3e..2f18bce 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d35c04715039a6d5702d2e5941866b4f", + "content-hash": "d8b4d19bf8ac49ff33a3b58504c43d63", "packages": [ { "name": "automattic/ignorefile", @@ -279,6 +279,97 @@ ], "time": "2022-12-23T10:58:28+00:00" }, + { + "name": "colinodell/json5", + "version": "v2.3.0", + "source": { + "type": "git", + "url": "https://github.com/colinodell/json5.git", + "reference": "15b063f8cb5e6deb15f0cd39123264ec0d19c710" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/colinodell/json5/zipball/15b063f8cb5e6deb15f0cd39123264ec0d19c710", + "reference": "15b063f8cb5e6deb15f0cd39123264ec0d19c710", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "php": "^7.1.3|^8.0" + }, + "conflict": { + "scrutinizer/ocular": "1.7.*" + }, + "require-dev": { + "mikehaertl/php-shellcommand": "^1.2.5", + "phpstan/phpstan": "^1.4", + "scrutinizer/ocular": "^1.6", + "squizlabs/php_codesniffer": "^2.3 || ^3.0", + "symfony/finder": "^4.4|^5.4|^6.0", + "symfony/phpunit-bridge": "^5.4|^6.0" + }, + "bin": [ + "bin/json5" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "files": [ + "src/global.php" + ], + "psr-4": { + "ColinODell\\Json5\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Developer" + } + ], + "description": "UTF-8 compatible JSON5 parser for PHP", + "homepage": "https://github.com/colinodell/json5", + "keywords": [ + "JSON5", + "json", + "json5_decode", + "json_decode" + ], + "support": { + "issues": "https://github.com/colinodell/json5/issues", + "source": "https://github.com/colinodell/json5/tree/v2.3.0" + }, + "funding": [ + { + "url": "https://www.colinodell.com/sponsor", + "type": "custom" + }, + { + "url": "https://www.paypal.me/colinpodell/10.00", + "type": "custom" + }, + { + "url": "https://github.com/colinodell", + "type": "github" + }, + { + "url": "https://www.patreon.com/colinodell", + "type": "patreon" + } + ], + "time": "2022-12-27T16:44:40+00:00" + }, { "name": "composer-unused/contracts", "version": "0.3.0", @@ -1599,6 +1690,314 @@ ], "time": "2023-11-30T14:35:29+00:00" }, + { + "name": "infection/abstract-testframework-adapter", + "version": "0.5.0", + "source": { + "type": "git", + "url": "https://github.com/infection/abstract-testframework-adapter.git", + "reference": "18925e20d15d1a5995bb85c9dc09e8751e1e069b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/infection/abstract-testframework-adapter/zipball/18925e20d15d1a5995bb85c9dc09e8751e1e069b", + "reference": "18925e20d15d1a5995bb85c9dc09e8751e1e069b", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.8", + "friendsofphp/php-cs-fixer": "^2.17", + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Infection\\AbstractTestFramework\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Maks Rafalko", + "email": "maks.rafalko@gmail.com" + } + ], + "description": "Abstract Test Framework Adapter for Infection", + "support": { + "issues": "https://github.com/infection/abstract-testframework-adapter/issues", + "source": "https://github.com/infection/abstract-testframework-adapter/tree/0.5.0" + }, + "funding": [ + { + "url": "https://github.com/infection", + "type": "github" + }, + { + "url": "https://opencollective.com/infection", + "type": "open_collective" + } + ], + "time": "2021-08-17T18:49:12+00:00" + }, + { + "name": "infection/extension-installer", + "version": "0.1.2", + "source": { + "type": "git", + "url": "https://github.com/infection/extension-installer.git", + "reference": "9b351d2910b9a23ab4815542e93d541e0ca0cdcf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/infection/extension-installer/zipball/9b351d2910b9a23ab4815542e93d541e0ca0cdcf", + "reference": "9b351d2910b9a23ab4815542e93d541e0ca0cdcf", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.1 || ^2.0" + }, + "require-dev": { + "composer/composer": "^1.9 || ^2.0", + "friendsofphp/php-cs-fixer": "^2.18, <2.19", + "infection/infection": "^0.15.2", + "php-coveralls/php-coveralls": "^2.4", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12.10", + "phpstan/phpstan-phpunit": "^0.12.6", + "phpstan/phpstan-strict-rules": "^0.12.2", + "phpstan/phpstan-webmozart-assert": "^0.12.2", + "phpunit/phpunit": "^9.5", + "vimeo/psalm": "^4.8" + }, + "type": "composer-plugin", + "extra": { + "class": "Infection\\ExtensionInstaller\\Plugin" + }, + "autoload": { + "psr-4": { + "Infection\\ExtensionInstaller\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Maks Rafalko", + "email": "maks.rafalko@gmail.com" + } + ], + "description": "Infection Extension Installer", + "support": { + "issues": "https://github.com/infection/extension-installer/issues", + "source": "https://github.com/infection/extension-installer/tree/0.1.2" + }, + "funding": [ + { + "url": "https://github.com/infection", + "type": "github" + }, + { + "url": "https://opencollective.com/infection", + "type": "open_collective" + } + ], + "time": "2021-10-20T22:08:34+00:00" + }, + { + "name": "infection/include-interceptor", + "version": "0.2.5", + "source": { + "type": "git", + "url": "https://github.com/infection/include-interceptor.git", + "reference": "0cc76d95a79d9832d74e74492b0a30139904bdf7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/infection/include-interceptor/zipball/0cc76d95a79d9832d74e74492b0a30139904bdf7", + "reference": "0cc76d95a79d9832d74e74492b0a30139904bdf7", + "shasum": "" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.16", + "infection/infection": "^0.15.0", + "phan/phan": "^2.4 || ^3", + "php-coveralls/php-coveralls": "^2.2", + "phpstan/phpstan": "^0.12.8", + "phpunit/phpunit": "^8.5", + "vimeo/psalm": "^3.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Infection\\StreamWrapper\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Maks Rafalko", + "email": "maks.rafalko@gmail.com" + } + ], + "description": "Stream Wrapper: Include Interceptor. Allows to replace included (autoloaded) file with another one.", + "support": { + "issues": "https://github.com/infection/include-interceptor/issues", + "source": "https://github.com/infection/include-interceptor/tree/0.2.5" + }, + "funding": [ + { + "url": "https://github.com/infection", + "type": "github" + }, + { + "url": "https://opencollective.com/infection", + "type": "open_collective" + } + ], + "time": "2021-08-09T10:03:57+00:00" + }, + { + "name": "infection/infection", + "version": "0.27.11", + "source": { + "type": "git", + "url": "https://github.com/infection/infection.git", + "reference": "6d55979c457eef2a5d0d80446c67ca533f201961" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/infection/infection/zipball/6d55979c457eef2a5d0d80446c67ca533f201961", + "reference": "6d55979c457eef2a5d0d80446c67ca533f201961", + "shasum": "" + }, + "require": { + "colinodell/json5": "^2.2", + "composer-runtime-api": "^2.0", + "composer/xdebug-handler": "^2.0 || ^3.0", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "fidry/cpu-core-counter": "^0.4.0 || ^0.5.0 || ^1.0", + "infection/abstract-testframework-adapter": "^0.5.0", + "infection/extension-installer": "^0.1.0", + "infection/include-interceptor": "^0.2.5", + "justinrainbow/json-schema": "^5.2.10", + "nikic/php-parser": "^4.15.1", + "ondram/ci-detector": "^4.1.0", + "php": "^8.1", + "sanmai/later": "^0.1.1", + "sanmai/pipeline": "^5.1 || ^6", + "sebastian/diff": "^3.0.2 || ^4.0 || ^5.0 || ^6.0", + "symfony/console": "^5.4 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0", + "symfony/finder": "^5.4 || ^6.0 || ^7.0", + "symfony/process": "^5.4 || ^6.0 || ^7.0", + "thecodingmachine/safe": "^2.1.2", + "webmozart/assert": "^1.11" + }, + "conflict": { + "antecedent/patchwork": "<2.1.25", + "dg/bypass-finals": "<1.4.1", + "phpunit/php-code-coverage": ">9,<9.1.4 || >9.2.17,<9.2.21" + }, + "require-dev": { + "brianium/paratest": "^6.11", + "ext-simplexml": "*", + "fidry/makefile": "^1.0", + "helmich/phpunit-json-assert": "^3.0", + "phpspec/prophecy": "^1.15", + "phpspec/prophecy-phpunit": "^2.0", + "phpstan/extension-installer": "^1.1.0", + "phpstan/phpstan": "^1.10.15", + "phpstan/phpstan-phpunit": "^1.0.0", + "phpstan/phpstan-strict-rules": "^1.1.0", + "phpstan/phpstan-webmozart-assert": "^1.0.2", + "phpunit/phpunit": "^9.6", + "rector/rector": "^0.16.0", + "sidz/phpstan-rules": "^0.4.0", + "symfony/yaml": "^5.4 || ^6.0 || ^7.0", + "thecodingmachine/phpstan-safe-rule": "^1.2.0" + }, + "bin": [ + "bin/infection" + ], + "type": "library", + "autoload": { + "psr-4": { + "Infection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Maks Rafalko", + "email": "maks.rafalko@gmail.com", + "homepage": "https://twitter.com/maks_rafalko" + }, + { + "name": "Oleg Zhulnev", + "homepage": "https://github.com/sidz" + }, + { + "name": "Gert de Pagter", + "homepage": "https://github.com/BackEndTea" + }, + { + "name": "Théo FIDRY", + "email": "theo.fidry@gmail.com", + "homepage": "https://twitter.com/tfidry" + }, + { + "name": "Alexey Kopytko", + "email": "alexey@kopytko.com", + "homepage": "https://www.alexeykopytko.com" + }, + { + "name": "Andreas Möller", + "email": "am@localheinz.com", + "homepage": "https://localheinz.com" + } + ], + "description": "Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.", + "keywords": [ + "coverage", + "mutant", + "mutation framework", + "mutation testing", + "testing", + "unit testing" + ], + "support": { + "issues": "https://github.com/infection/infection/issues", + "source": "https://github.com/infection/infection/tree/0.27.11" + }, + "funding": [ + { + "url": "https://github.com/infection", + "type": "github" + }, + { + "url": "https://opencollective.com/infection", + "type": "open_collective" + } + ], + "time": "2024-03-20T07:48:57+00:00" + }, { "name": "justinrainbow/json-schema", "version": "5.3.0", @@ -3726,6 +4125,135 @@ ], "time": "2024-08-12T16:36:46+00:00" }, + { + "name": "sanmai/later", + "version": "0.1.4", + "source": { + "type": "git", + "url": "https://github.com/sanmai/later.git", + "reference": "e24c4304a4b1349c2a83151a692cec0c10579f60" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sanmai/later/zipball/e24c4304a4b1349c2a83151a692cec0c10579f60", + "reference": "e24c4304a4b1349c2a83151a692cec0c10579f60", + "shasum": "" + }, + "require": { + "php": ">=7.4" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.8", + "friendsofphp/php-cs-fixer": "^3.35.1", + "infection/infection": ">=0.27.6", + "phan/phan": ">=2", + "php-coveralls/php-coveralls": "^2.0", + "phpstan/phpstan": ">=1.4.5", + "phpunit/phpunit": ">=9.5 <10", + "vimeo/psalm": ">=2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "0.1.x-dev" + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Later\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Alexey Kopytko", + "email": "alexey@kopytko.com" + } + ], + "description": "Later: deferred wrapper object", + "support": { + "issues": "https://github.com/sanmai/later/issues", + "source": "https://github.com/sanmai/later/tree/0.1.4" + }, + "funding": [ + { + "url": "https://github.com/sanmai", + "type": "github" + } + ], + "time": "2023-10-24T00:25:28+00:00" + }, + { + "name": "sanmai/pipeline", + "version": "v6.11", + "source": { + "type": "git", + "url": "https://github.com/sanmai/pipeline.git", + "reference": "a5fa2a6c6ca93efa37e7c24aab72f47448a6b110" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sanmai/pipeline/zipball/a5fa2a6c6ca93efa37e7c24aab72f47448a6b110", + "reference": "a5fa2a6c6ca93efa37e7c24aab72f47448a6b110", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.8", + "friendsofphp/php-cs-fixer": "^3.17", + "infection/infection": ">=0.10.5", + "league/pipeline": "^0.3 || ^1.0", + "phan/phan": ">=1.1", + "php-coveralls/php-coveralls": "^2.4.1", + "phpstan/phpstan": ">=0.10", + "phpunit/phpunit": ">=9.4", + "vimeo/psalm": ">=2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "v6.x-dev" + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Pipeline\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Alexey Kopytko", + "email": "alexey@kopytko.com" + } + ], + "description": "General-purpose collections pipeline", + "support": { + "issues": "https://github.com/sanmai/pipeline/issues", + "source": "https://github.com/sanmai/pipeline/tree/v6.11" + }, + "funding": [ + { + "url": "https://github.com/sanmai", + "type": "github" + } + ], + "time": "2024-06-15T03:11:19+00:00" + }, { "name": "sebastian/cli-parser", "version": "2.0.1", @@ -6811,6 +7339,145 @@ ], "time": "2024-06-28T08:00:31+00:00" }, + { + "name": "thecodingmachine/safe", + "version": "v2.5.0", + "source": { + "type": "git", + "url": "https://github.com/thecodingmachine/safe.git", + "reference": "3115ecd6b4391662b4931daac4eba6b07a2ac1f0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/3115ecd6b4391662b4931daac4eba6b07a2ac1f0", + "reference": "3115ecd6b4391662b4931daac4eba6b07a2ac1f0", + "shasum": "" + }, + "require": { + "php": "^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.5", + "phpunit/phpunit": "^9.5", + "squizlabs/php_codesniffer": "^3.2", + "thecodingmachine/phpstan-strict-rules": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2.x-dev" + } + }, + "autoload": { + "files": [ + "deprecated/apc.php", + "deprecated/array.php", + "deprecated/datetime.php", + "deprecated/libevent.php", + "deprecated/misc.php", + "deprecated/password.php", + "deprecated/mssql.php", + "deprecated/stats.php", + "deprecated/strings.php", + "lib/special_cases.php", + "deprecated/mysqli.php", + "generated/apache.php", + "generated/apcu.php", + "generated/array.php", + "generated/bzip2.php", + "generated/calendar.php", + "generated/classobj.php", + "generated/com.php", + "generated/cubrid.php", + "generated/curl.php", + "generated/datetime.php", + "generated/dir.php", + "generated/eio.php", + "generated/errorfunc.php", + "generated/exec.php", + "generated/fileinfo.php", + "generated/filesystem.php", + "generated/filter.php", + "generated/fpm.php", + "generated/ftp.php", + "generated/funchand.php", + "generated/gettext.php", + "generated/gmp.php", + "generated/gnupg.php", + "generated/hash.php", + "generated/ibase.php", + "generated/ibmDb2.php", + "generated/iconv.php", + "generated/image.php", + "generated/imap.php", + "generated/info.php", + "generated/inotify.php", + "generated/json.php", + "generated/ldap.php", + "generated/libxml.php", + "generated/lzf.php", + "generated/mailparse.php", + "generated/mbstring.php", + "generated/misc.php", + "generated/mysql.php", + "generated/network.php", + "generated/oci8.php", + "generated/opcache.php", + "generated/openssl.php", + "generated/outcontrol.php", + "generated/pcntl.php", + "generated/pcre.php", + "generated/pgsql.php", + "generated/posix.php", + "generated/ps.php", + "generated/pspell.php", + "generated/readline.php", + "generated/rpminfo.php", + "generated/rrd.php", + "generated/sem.php", + "generated/session.php", + "generated/shmop.php", + "generated/sockets.php", + "generated/sodium.php", + "generated/solr.php", + "generated/spl.php", + "generated/sqlsrv.php", + "generated/ssdeep.php", + "generated/ssh2.php", + "generated/stream.php", + "generated/strings.php", + "generated/swoole.php", + "generated/uodbc.php", + "generated/uopz.php", + "generated/url.php", + "generated/var.php", + "generated/xdiff.php", + "generated/xml.php", + "generated/xmlrpc.php", + "generated/yaml.php", + "generated/yaz.php", + "generated/zip.php", + "generated/zlib.php" + ], + "classmap": [ + "lib/DateTime.php", + "lib/DateTimeImmutable.php", + "lib/Exceptions/", + "deprecated/Exceptions/", + "generated/Exceptions/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHP core functions that throw exceptions instead of returning FALSE on error", + "support": { + "issues": "https://github.com/thecodingmachine/safe/issues", + "source": "https://github.com/thecodingmachine/safe/tree/v2.5.0" + }, + "time": "2023-04-05T11:54:14+00:00" + }, { "name": "theseer/tokenizer", "version": "1.2.3", diff --git a/infection.json5.dist b/infection.json5.dist new file mode 100644 index 0000000..2619a53 --- /dev/null +++ b/infection.json5.dist @@ -0,0 +1,19 @@ +{ + "$schema": "vendor/infection/infection/resources/schema.json", + "source": { + "directories": [ + "src" + ] + }, + "logs": { + "text": "var/infection.log", + "stryker": { + "report": "/^\\d+\\.\\d+\\.x$/" + }, + }, + "tmpDir": "var", + "minCoveredMsi": 99, + "mutators": { + "@default": true + } +} diff --git a/tests/Configuration/ConfigurationTest.php b/tests/Configuration/ConfigurationTest.php index e7e1fa6..55bb515 100644 --- a/tests/Configuration/ConfigurationTest.php +++ b/tests/Configuration/ConfigurationTest.php @@ -4,11 +4,10 @@ namespace App\Configuration; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; -/** - * @uses \Configuration - */ +#[CoversClass(Configuration::class)] final class ConfigurationTest extends TestCase { /** @@ -61,9 +60,6 @@ protected function setUp(): void // $this->configuration = new Configuration(); } - /** - * @covers \Configuration::get - */ public function testCheckDefaultOptionGitHubWorkspace(): void { putenv('GITHUB_WORKSPACE=' . self::DEFAULT_ENV_GITHUB_WORKSPACE); @@ -79,9 +75,6 @@ public function testCheckDefaultOptionGitHubWorkspace(): void ); } - /** - * @covers \Configuration::get - */ public function testCheckDefaultGetRootDirectory(): void { putenv('GITHUB_WORKSPACE=' . self::DEFAULT_ENV_GITHUB_WORKSPACE); @@ -97,9 +90,6 @@ public function testCheckDefaultGetRootDirectory(): void ); } - /** - * @covers \Configuration::get - */ public function testCheckDefaultOptionGitHubOutput(): void { putenv('GITHUB_WORKSPACE=' . self::DEFAULT_ENV_GITHUB_WORKSPACE); @@ -115,9 +105,6 @@ public function testCheckDefaultOptionGitHubOutput(): void ); } - /** - * @covers \Configuration::get - */ public function testCheckDefaultOptionBuildDirectory(): void { putenv('GITHUB_WORKSPACE=' . self::DEFAULT_ENV_GITHUB_WORKSPACE); @@ -133,9 +120,6 @@ public function testCheckDefaultOptionBuildDirectory(): void ); } - /** - * @covers \Configuration::get - */ public function testCheckDefaultOptionBuildFile(): void { putenv('GITHUB_WORKSPACE=' . self::DEFAULT_ENV_GITHUB_WORKSPACE); @@ -152,9 +136,6 @@ public function testCheckDefaultOptionBuildFile(): void ); } - /** - * @covers \Configuration::get - */ public function testCheckOtherOptionOptionGitHubOutput(): void { putenv('GITHUB_WORKSPACE=' . self::OTHER_ENV_GITHUB_WORKSPACE); @@ -170,9 +151,6 @@ public function testCheckOtherOptionOptionGitHubOutput(): void ); } - /** - * @covers \Configuration::get - */ public function testCheckOtherGetRootDirectory(): void { putenv('GITHUB_WORKSPACE=' . self::OTHER_ENV_GITHUB_WORKSPACE); @@ -188,9 +166,6 @@ public function testCheckOtherGetRootDirectory(): void ); } - /** - * @covers \Configuration::get - */ public function testCheckOtherOptionGitHubOutput(): void { putenv('GITHUB_WORKSPACE=' . self::OTHER_ENV_GITHUB_WORKSPACE); @@ -206,9 +181,6 @@ public function testCheckOtherOptionGitHubOutput(): void ); } - /** - * @covers \Configuration::get - */ public function testCheckOtherOptionBuildDirectory(): void { putenv('GITHUB_WORKSPACE=' . self::OTHER_ENV_GITHUB_WORKSPACE); @@ -224,9 +196,6 @@ public function testCheckOtherOptionBuildDirectory(): void ); } - /** - * @covers \Configuration::get - */ public function testCheckOtherOptionBuildFile(): void { putenv('GITHUB_WORKSPACE=' . self::OTHER_ENV_GITHUB_WORKSPACE);