Add php unit watcher and update unit test docs (#44681)

* Add phpunit-watcher to automatically rerun PHPUnit tests when source code changes

* Update unit tests docs

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Chi-Hsuan Huang 2024-02-19 16:40:29 +08:00 committed by GitHub
parent 76f6b0097e
commit 0b55f4ee12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 931 additions and 153 deletions

View File

@ -0,0 +1,14 @@
watch:
directories:
- src
- includes
- tests/php
- tests/unit-tests
- tests/legacy
fileMask: '*.php'
phpunit:
binaryPath: ./vendor/bin/phpunit
timeout: 600
notifications:
passingTests: false
failingTests: false

View File

@ -268,16 +268,16 @@
},
{
"name": "symfony/console",
"version": "v5.4.32",
"version": "v5.4.35",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "c70df1ffaf23a8d340bded3cfab1b86752ad6ed7"
"reference": "dbdf6adcb88d5f83790e1efb57ef4074309d3931"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/c70df1ffaf23a8d340bded3cfab1b86752ad6ed7",
"reference": "c70df1ffaf23a8d340bded3cfab1b86752ad6ed7",
"url": "https://api.github.com/repos/symfony/console/zipball/dbdf6adcb88d5f83790e1efb57ef4074309d3931",
"reference": "dbdf6adcb88d5f83790e1efb57ef4074309d3931",
"shasum": ""
},
"require": {
@ -347,7 +347,7 @@
"terminal"
],
"support": {
"source": "https://github.com/symfony/console/tree/v5.4.32"
"source": "https://github.com/symfony/console/tree/v5.4.35"
},
"funding": [
{
@ -363,7 +363,7 @@
"type": "tidelift"
}
],
"time": "2023-11-18T18:23:04+00:00"
"time": "2024-01-23T14:28:09+00:00"
},
{
"name": "symfony/deprecation-contracts",
@ -434,16 +434,16 @@
},
{
"name": "symfony/finder",
"version": "v5.4.27",
"version": "v5.4.35",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
"reference": "ff4bce3c33451e7ec778070e45bd23f74214cd5d"
"reference": "abe6d6f77d9465fed3cd2d029b29d03b56b56435"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/ff4bce3c33451e7ec778070e45bd23f74214cd5d",
"reference": "ff4bce3c33451e7ec778070e45bd23f74214cd5d",
"url": "https://api.github.com/repos/symfony/finder/zipball/abe6d6f77d9465fed3cd2d029b29d03b56b56435",
"reference": "abe6d6f77d9465fed3cd2d029b29d03b56b56435",
"shasum": ""
},
"require": {
@ -477,7 +477,7 @@
"description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/finder/tree/v5.4.27"
"source": "https://github.com/symfony/finder/tree/v5.4.35"
},
"funding": [
{
@ -493,20 +493,20 @@
"type": "tidelift"
}
],
"time": "2023-07-31T08:02:31+00:00"
"time": "2024-01-23T13:51:25+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.28.0",
"version": "v1.29.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb"
"reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb",
"reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4",
"reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4",
"shasum": ""
},
"require": {
@ -520,9 +520,6 @@
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
@ -559,7 +556,7 @@
"portable"
],
"support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0"
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0"
},
"funding": [
{
@ -575,20 +572,20 @@
"type": "tidelift"
}
],
"time": "2023-01-26T09:26:14+00:00"
"time": "2024-01-29T20:11:03+00:00"
},
{
"name": "symfony/polyfill-intl-grapheme",
"version": "v1.28.0",
"version": "v1.29.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-grapheme.git",
"reference": "875e90aeea2777b6f135677f618529449334a612"
"reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612",
"reference": "875e90aeea2777b6f135677f618529449334a612",
"url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32a9da87d7b3245e09ac426c83d334ae9f06f80f",
"reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f",
"shasum": ""
},
"require": {
@ -599,9 +596,6 @@
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
@ -640,7 +634,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0"
"source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.29.0"
},
"funding": [
{
@ -656,20 +650,20 @@
"type": "tidelift"
}
],
"time": "2023-01-26T09:26:14+00:00"
"time": "2024-01-29T20:11:03+00:00"
},
{
"name": "symfony/polyfill-intl-normalizer",
"version": "v1.28.0",
"version": "v1.29.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
"reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92"
"reference": "bc45c394692b948b4d383a08d7753968bed9a83d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92",
"reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92",
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d",
"reference": "bc45c394692b948b4d383a08d7753968bed9a83d",
"shasum": ""
},
"require": {
@ -680,9 +674,6 @@
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
@ -724,7 +715,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0"
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0"
},
"funding": [
{
@ -740,20 +731,20 @@
"type": "tidelift"
}
],
"time": "2023-01-26T09:26:14+00:00"
"time": "2024-01-29T20:11:03+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.28.0",
"version": "v1.29.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "42292d99c55abe617799667f454222c54c60e229"
"reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229",
"reference": "42292d99c55abe617799667f454222c54c60e229",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec",
"reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec",
"shasum": ""
},
"require": {
@ -767,9 +758,6 @@
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
@ -807,7 +795,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0"
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0"
},
"funding": [
{
@ -823,20 +811,20 @@
"type": "tidelift"
}
],
"time": "2023-07-28T09:04:16+00:00"
"time": "2024-01-29T20:11:03+00:00"
},
{
"name": "symfony/polyfill-php73",
"version": "v1.28.0",
"version": "v1.29.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php73.git",
"reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5"
"reference": "21bd091060673a1177ae842c0ef8fe30893114d2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5",
"reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5",
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/21bd091060673a1177ae842c0ef8fe30893114d2",
"reference": "21bd091060673a1177ae842c0ef8fe30893114d2",
"shasum": ""
},
"require": {
@ -844,9 +832,6 @@
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
@ -886,7 +871,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php73/tree/v1.28.0"
"source": "https://github.com/symfony/polyfill-php73/tree/v1.29.0"
},
"funding": [
{
@ -902,20 +887,20 @@
"type": "tidelift"
}
],
"time": "2023-01-26T09:26:14+00:00"
"time": "2024-01-29T20:11:03+00:00"
},
{
"name": "symfony/polyfill-php80",
"version": "v1.28.0",
"version": "v1.29.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5"
"reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5",
"reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b",
"reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b",
"shasum": ""
},
"require": {
@ -923,9 +908,6 @@
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.28-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
@ -969,7 +951,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0"
"source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0"
},
"funding": [
{
@ -985,7 +967,7 @@
"type": "tidelift"
}
],
"time": "2023-01-26T09:26:14+00:00"
"time": "2024-01-29T20:11:03+00:00"
},
{
"name": "symfony/service-contracts",
@ -1072,16 +1054,16 @@
},
{
"name": "symfony/string",
"version": "v5.4.32",
"version": "v5.4.35",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
"reference": "91bf4453d65d8231688a04376c3a40efe0770f04"
"reference": "c209c4d0559acce1c9a2067612cfb5d35756edc2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/91bf4453d65d8231688a04376c3a40efe0770f04",
"reference": "91bf4453d65d8231688a04376c3a40efe0770f04",
"url": "https://api.github.com/repos/symfony/string/zipball/c209c4d0559acce1c9a2067612cfb5d35756edc2",
"reference": "c209c4d0559acce1c9a2067612cfb5d35756edc2",
"shasum": ""
},
"require": {
@ -1138,7 +1120,7 @@
"utf8"
],
"support": {
"source": "https://github.com/symfony/string/tree/v5.4.32"
"source": "https://github.com/symfony/string/tree/v5.4.35"
},
"funding": [
{
@ -1154,7 +1136,7 @@
"type": "tidelift"
}
],
"time": "2023-11-26T13:43:46+00:00"
"time": "2024-01-23T13:51:25+00:00"
}
],
"aliases": [],

View File

@ -312,16 +312,16 @@
},
{
"name": "squizlabs/php_codesniffer",
"version": "3.8.0",
"version": "3.8.1",
"source": {
"type": "git",
"url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
"reference": "5805f7a4e4958dbb5e944ef1e6edae0a303765e7"
"reference": "14f5fff1e64118595db5408e946f3a22c75807f7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/5805f7a4e4958dbb5e944ef1e6edae0a303765e7",
"reference": "5805f7a4e4958dbb5e944ef1e6edae0a303765e7",
"url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/14f5fff1e64118595db5408e946f3a22c75807f7",
"reference": "14f5fff1e64118595db5408e946f3a22c75807f7",
"shasum": ""
},
"require": {
@ -331,11 +331,11 @@
"php": ">=5.4.0"
},
"require-dev": {
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0"
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4"
},
"bin": [
"bin/phpcs",
"bin/phpcbf"
"bin/phpcbf",
"bin/phpcs"
],
"type": "library",
"extra": {
@ -388,7 +388,7 @@
"type": "open_collective"
}
],
"time": "2023-12-08T12:32:31+00:00"
"time": "2024-01-11T20:47:48+00:00"
},
{
"name": "woocommerce/woocommerce-sniffs",

View File

@ -138,25 +138,27 @@
},
{
"name": "nikic/php-parser",
"version": "v4.18.0",
"version": "v5.0.0",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999"
"reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bcbb2179f97633e98bbbc87044ee2611c7d7999",
"reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4a21235f7e56e713259a6f76bf4b5ea08502b9dc",
"reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc",
"shasum": ""
},
"require": {
"ext-ctype": "*",
"ext-json": "*",
"ext-tokenizer": "*",
"php": ">=7.0"
"php": ">=7.4"
},
"require-dev": {
"ircmaxell/php-yacc": "^0.0.7",
"phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0"
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
},
"bin": [
"bin/php-parse"
@ -164,7 +166,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.9-dev"
"dev-master": "5.0-dev"
}
},
"autoload": {
@ -188,9 +190,9 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v4.18.0"
"source": "https://github.com/nikic/PHP-Parser/tree/v5.0.0"
},
"time": "2023-12-10T21:03:43+00:00"
"time": "2024-01-07T17:17:35+00:00"
},
{
"name": "phar-io/manifest",
@ -305,23 +307,23 @@
},
{
"name": "phpunit/php-code-coverage",
"version": "9.2.29",
"version": "9.2.30",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76"
"reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6a3a87ac2bbe33b25042753df8195ba4aa534c76",
"reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca2bd87d2f9215904682a9cb9bb37dda98e76089",
"reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-libxml": "*",
"ext-xmlwriter": "*",
"nikic/php-parser": "^4.15",
"nikic/php-parser": "^4.18 || ^5.0",
"php": ">=7.3",
"phpunit/php-file-iterator": "^3.0.3",
"phpunit/php-text-template": "^2.0.2",
@ -371,7 +373,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.29"
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.30"
},
"funding": [
{
@ -379,7 +381,7 @@
"type": "github"
}
],
"time": "2023-09-19T04:57:46+00:00"
"time": "2023-12-22T06:47:57+00:00"
},
{
"name": "phpunit/php-file-iterator",
@ -624,16 +626,16 @@
},
{
"name": "phpunit/phpunit",
"version": "9.6.15",
"version": "9.6.16",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "05017b80304e0eb3f31d90194a563fd53a6021f1"
"reference": "3767b2c56ce02d01e3491046f33466a1ae60a37f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/05017b80304e0eb3f31d90194a563fd53a6021f1",
"reference": "05017b80304e0eb3f31d90194a563fd53a6021f1",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3767b2c56ce02d01e3491046f33466a1ae60a37f",
"reference": "3767b2c56ce02d01e3491046f33466a1ae60a37f",
"shasum": ""
},
"require": {
@ -707,7 +709,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.15"
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.16"
},
"funding": [
{
@ -723,7 +725,7 @@
"type": "tidelift"
}
],
"time": "2023-12-01T16:55:19+00:00"
"time": "2024-01-19T07:03:14+00:00"
},
{
"name": "sebastian/cli-parser",
@ -968,20 +970,20 @@
},
{
"name": "sebastian/complexity",
"version": "2.0.2",
"version": "2.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/complexity.git",
"reference": "739b35e53379900cc9ac327b2147867b8b6efd88"
"reference": "25f207c40d62b8b7aa32f5ab026c53561964053a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88",
"reference": "739b35e53379900cc9ac327b2147867b8b6efd88",
"url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a",
"reference": "25f207c40d62b8b7aa32f5ab026c53561964053a",
"shasum": ""
},
"require": {
"nikic/php-parser": "^4.7",
"nikic/php-parser": "^4.18 || ^5.0",
"php": ">=7.3"
},
"require-dev": {
@ -1013,7 +1015,7 @@
"homepage": "https://github.com/sebastianbergmann/complexity",
"support": {
"issues": "https://github.com/sebastianbergmann/complexity/issues",
"source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2"
"source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3"
},
"funding": [
{
@ -1021,7 +1023,7 @@
"type": "github"
}
],
"time": "2020-10-26T15:52:27+00:00"
"time": "2023-12-22T06:19:30+00:00"
},
{
"name": "sebastian/diff",
@ -1295,20 +1297,20 @@
},
{
"name": "sebastian/lines-of-code",
"version": "1.0.3",
"version": "1.0.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/lines-of-code.git",
"reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc"
"reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc",
"reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc",
"url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5",
"reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5",
"shasum": ""
},
"require": {
"nikic/php-parser": "^4.6",
"nikic/php-parser": "^4.18 || ^5.0",
"php": ">=7.3"
},
"require-dev": {
@ -1340,7 +1342,7 @@
"homepage": "https://github.com/sebastianbergmann/lines-of-code",
"support": {
"issues": "https://github.com/sebastianbergmann/lines-of-code/issues",
"source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3"
"source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4"
},
"funding": [
{
@ -1348,7 +1350,7 @@
"type": "github"
}
],
"time": "2020-11-28T06:42:11+00:00"
"time": "2023-12-22T06:20:34+00:00"
},
{
"name": "sebastian/object-enumerator",

View File

@ -222,16 +222,16 @@
},
{
"name": "mck89/peast",
"version": "v1.15.4",
"version": "v1.16.1",
"source": {
"type": "git",
"url": "https://github.com/mck89/peast.git",
"reference": "1df4dc28a6b5bb7ab117ab073c1712256e954e18"
"reference": "f6e681062bb25c8dacbd30e079f4ad3fd890d7ad"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mck89/peast/zipball/1df4dc28a6b5bb7ab117ab073c1712256e954e18",
"reference": "1df4dc28a6b5bb7ab117ab073c1712256e954e18",
"url": "https://api.github.com/repos/mck89/peast/zipball/f6e681062bb25c8dacbd30e079f4ad3fd890d7ad",
"reference": "f6e681062bb25c8dacbd30e079f4ad3fd890d7ad",
"shasum": ""
},
"require": {
@ -244,7 +244,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.15.4-dev"
"dev-master": "1.16.1-dev"
}
},
"autoload": {
@ -265,9 +265,9 @@
"description": "Peast is PHP library that generates AST for JavaScript code",
"support": {
"issues": "https://github.com/mck89/peast/issues",
"source": "https://github.com/mck89/peast/tree/v1.15.4"
"source": "https://github.com/mck89/peast/tree/v1.16.1"
},
"time": "2023-08-12T08:29:29+00:00"
"time": "2024-02-14T08:15:19+00:00"
},
{
"name": "mustache/mustache",
@ -373,16 +373,16 @@
},
{
"name": "wp-cli/i18n-command",
"version": "v2.5.0",
"version": "v2.6.0",
"source": {
"type": "git",
"url": "https://github.com/wp-cli/i18n-command.git",
"reference": "9cf9b40f6bad64ade8660cc26bf1f28f2d223268"
"reference": "ca7a44a1f8b09d533621b4006e739974212860ee"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/wp-cli/i18n-command/zipball/9cf9b40f6bad64ade8660cc26bf1f28f2d223268",
"reference": "9cf9b40f6bad64ade8660cc26bf1f28f2d223268",
"url": "https://api.github.com/repos/wp-cli/i18n-command/zipball/ca7a44a1f8b09d533621b4006e739974212860ee",
"reference": "ca7a44a1f8b09d533621b4006e739974212860ee",
"shasum": ""
},
"require": {
@ -410,6 +410,7 @@
"i18n make-pot",
"i18n make-json",
"i18n make-mo",
"i18n make-php",
"i18n update-po"
]
},
@ -435,9 +436,9 @@
"homepage": "https://github.com/wp-cli/i18n-command",
"support": {
"issues": "https://github.com/wp-cli/i18n-command/issues",
"source": "https://github.com/wp-cli/i18n-command/tree/v2.5.0"
"source": "https://github.com/wp-cli/i18n-command/tree/v2.6.0"
},
"time": "2023-11-16T17:09:37+00:00"
"time": "2024-02-01T14:25:11+00:00"
},
{
"name": "wp-cli/mustangostang-spyc",
@ -555,16 +556,16 @@
},
{
"name": "wp-cli/wp-cli",
"version": "v2.9.0",
"version": "v2.10.0",
"source": {
"type": "git",
"url": "https://github.com/wp-cli/wp-cli.git",
"reference": "8a3befba2d947fbf5cc6d1941edf2dd99da4d4b7"
"reference": "a339dca576df73c31af4b4d8054efc2dab9a0685"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/wp-cli/wp-cli/zipball/8a3befba2d947fbf5cc6d1941edf2dd99da4d4b7",
"reference": "8a3befba2d947fbf5cc6d1941edf2dd99da4d4b7",
"url": "https://api.github.com/repos/wp-cli/wp-cli/zipball/a339dca576df73c31af4b4d8054efc2dab9a0685",
"reference": "a339dca576df73c31af4b4d8054efc2dab9a0685",
"shasum": ""
},
"require": {
@ -594,7 +595,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "2.9.x-dev"
"dev-main": "2.10.x-dev"
}
},
"autoload": {
@ -621,7 +622,7 @@
"issues": "https://github.com/wp-cli/wp-cli/issues",
"source": "https://github.com/wp-cli/wp-cli"
},
"time": "2023-10-25T09:06:37+00:00"
"time": "2024-02-08T16:52:43+00:00"
}
],
"aliases": [],

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Add php unit watcher and update unit test docs

View File

@ -35,8 +35,9 @@
"mockery/mockery": "1.6.6",
"phpunit/phpunit": "^9.6",
"sebastian/comparator": "^4.0",
"yoast/phpunit-polyfills": "^2.0",
"woocommerce/monorepo-plugin": "*"
"spatie/phpunit-watcher": "^1.23",
"woocommerce/monorepo-plugin": "*",
"yoast/phpunit-polyfills": "^2.0"
},
"config": {
"optimize-autoloader": true,

View File

@ -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": "28d08f86788277204dc1b51d20b2ee41",
"content-hash": "d170e6eb5a865b5eccdf3f305749e3f6",
"packages": [
{
"name": "automattic/jetpack-a8c-mc-stats",
@ -1123,6 +1123,218 @@
},
"time": "2022-10-31T08:38:03+00:00"
},
{
"name": "clue/stdio-react",
"version": "v2.6.0",
"source": {
"type": "git",
"url": "https://github.com/clue/reactphp-stdio.git",
"reference": "dfa6c378aabdff718202d4e2453f752c38ea3399"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/clue/reactphp-stdio/zipball/dfa6c378aabdff718202d4e2453f752c38ea3399",
"reference": "dfa6c378aabdff718202d4e2453f752c38ea3399",
"shasum": ""
},
"require": {
"clue/term-react": "^1.0 || ^0.1.1",
"clue/utf8-react": "^1.0 || ^0.1",
"php": ">=5.3",
"react/event-loop": "^1.2",
"react/stream": "^1.2"
},
"require-dev": {
"clue/arguments": "^2.0",
"clue/commander": "^1.2",
"phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35"
},
"suggest": {
"ext-mbstring": "Using ext-mbstring should provide slightly better performance for handling I/O"
},
"type": "library",
"autoload": {
"psr-4": {
"Clue\\React\\Stdio\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Christian Lück",
"email": "christian@clue.engineering"
}
],
"description": "Async, event-driven console input & output (STDIN, STDOUT) for truly interactive CLI applications, built on top of ReactPHP",
"homepage": "https://github.com/clue/reactphp-stdio",
"keywords": [
"async",
"autocomplete",
"autocompletion",
"cli",
"history",
"interactive",
"reactphp",
"readline",
"stdin",
"stdio",
"stdout"
],
"support": {
"issues": "https://github.com/clue/reactphp-stdio/issues",
"source": "https://github.com/clue/reactphp-stdio/tree/v2.6.0"
},
"funding": [
{
"url": "https://clue.engineering/support",
"type": "custom"
},
{
"url": "https://github.com/clue",
"type": "github"
}
],
"time": "2022-03-18T15:09:30+00:00"
},
{
"name": "clue/term-react",
"version": "v1.4.0",
"source": {
"type": "git",
"url": "https://github.com/clue/reactphp-term.git",
"reference": "00f297dc597eaee2ebf98af8f27cca5d21d60fa3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/clue/reactphp-term/zipball/00f297dc597eaee2ebf98af8f27cca5d21d60fa3",
"reference": "00f297dc597eaee2ebf98af8f27cca5d21d60fa3",
"shasum": ""
},
"require": {
"php": ">=5.3",
"react/stream": "^1.2"
},
"require-dev": {
"phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36",
"react/event-loop": "^1.2"
},
"type": "library",
"autoload": {
"psr-4": {
"Clue\\React\\Term\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Christian Lück",
"email": "christian@clue.engineering"
}
],
"description": "Streaming terminal emulator, built on top of ReactPHP.",
"homepage": "https://github.com/clue/reactphp-term",
"keywords": [
"C0",
"CSI",
"ansi",
"apc",
"ascii",
"c1",
"control codes",
"dps",
"osc",
"pm",
"reactphp",
"streaming",
"terminal",
"vt100",
"xterm"
],
"support": {
"issues": "https://github.com/clue/reactphp-term/issues",
"source": "https://github.com/clue/reactphp-term/tree/v1.4.0"
},
"funding": [
{
"url": "https://clue.engineering/support",
"type": "custom"
},
{
"url": "https://github.com/clue",
"type": "github"
}
],
"time": "2024-01-30T10:22:09+00:00"
},
{
"name": "clue/utf8-react",
"version": "v1.3.0",
"source": {
"type": "git",
"url": "https://github.com/clue/reactphp-utf8.git",
"reference": "d5cd04d39cb5457aa5df830b7c4b301d2694217e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/clue/reactphp-utf8/zipball/d5cd04d39cb5457aa5df830b7c4b301d2694217e",
"reference": "d5cd04d39cb5457aa5df830b7c4b301d2694217e",
"shasum": ""
},
"require": {
"php": ">=5.3",
"react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4 || ^0.3"
},
"require-dev": {
"phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36",
"react/stream": "^1.0 || ^0.7"
},
"type": "library",
"autoload": {
"psr-4": {
"Clue\\React\\Utf8\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Christian Lück",
"email": "christian@clue.engineering"
}
],
"description": "Streaming UTF-8 parser, built on top of ReactPHP.",
"homepage": "https://github.com/clue/reactphp-utf8",
"keywords": [
"reactphp",
"streaming",
"unicode",
"utf-8",
"utf8"
],
"support": {
"issues": "https://github.com/clue/reactphp-utf8/issues",
"source": "https://github.com/clue/reactphp-utf8/tree/v1.3.0"
},
"funding": [
{
"url": "https://clue.engineering/support",
"type": "custom"
},
{
"url": "https://github.com/clue",
"type": "github"
}
],
"time": "2023-12-06T14:52:17+00:00"
},
{
"name": "dms/phpunit-arraysubset-asserts",
"version": "v0.4.0",
@ -1238,6 +1450,53 @@
],
"time": "2022-12-30T00:15:36+00:00"
},
{
"name": "evenement/evenement",
"version": "v3.0.2",
"source": {
"type": "git",
"url": "https://github.com/igorw/evenement.git",
"reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/igorw/evenement/zipball/0a16b0d71ab13284339abb99d9d2bd813640efbc",
"reference": "0a16b0d71ab13284339abb99d9d2bd813640efbc",
"shasum": ""
},
"require": {
"php": ">=7.0"
},
"require-dev": {
"phpunit/phpunit": "^9 || ^6"
},
"type": "library",
"autoload": {
"psr-4": {
"Evenement\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Igor Wiedler",
"email": "igor@wiedler.ch"
}
],
"description": "Événement is a very simple event dispatching library for PHP",
"keywords": [
"event-dispatcher",
"event-emitter"
],
"support": {
"issues": "https://github.com/igorw/evenement/issues",
"source": "https://github.com/igorw/evenement/tree/v3.0.2"
},
"time": "2023-08-08T05:53:35+00:00"
},
{
"name": "hamcrest/hamcrest-php",
"version": "v2.0.1",
@ -1289,6 +1548,68 @@
},
"time": "2020-07-09T08:09:16+00:00"
},
{
"name": "jolicode/jolinotif",
"version": "v2.4.0",
"source": {
"type": "git",
"url": "https://github.com/jolicode/JoliNotif.git",
"reference": "a15bfc0d5aef432f150385924ede4e099643edb7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/jolicode/JoliNotif/zipball/a15bfc0d5aef432f150385924ede4e099643edb7",
"reference": "a15bfc0d5aef432f150385924ede4e099643edb7",
"shasum": ""
},
"require": {
"php": ">=7.4",
"symfony/process": "^4.0|^5.0|^6.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.0",
"symfony/finder": "^5.0",
"symfony/phpunit-bridge": "^5.0"
},
"bin": [
"jolinotif"
],
"type": "library",
"autoload": {
"psr-4": {
"Joli\\JoliNotif\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Loïck Piera",
"email": "pyrech@gmail.com"
}
],
"description": "Send desktop notifications on Windows, Linux, MacOS.",
"keywords": [
"MAC",
"growl",
"linux",
"notification",
"windows"
],
"support": {
"issues": "https://github.com/jolicode/JoliNotif/issues",
"source": "https://github.com/jolicode/JoliNotif/tree/v2.4.0"
},
"funding": [
{
"url": "https://tidelift.com/funding/github/packagist/jolicode/jolinotif",
"type": "tidelift"
}
],
"time": "2021-12-01T16:20:42+00:00"
},
{
"name": "mockery/mockery",
"version": "1.6.6",
@ -2070,6 +2391,156 @@
},
"time": "2021-11-05T16:50:12+00:00"
},
{
"name": "react/event-loop",
"version": "v1.5.0",
"source": {
"type": "git",
"url": "https://github.com/reactphp/event-loop.git",
"reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/reactphp/event-loop/zipball/bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354",
"reference": "bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36"
},
"suggest": {
"ext-pcntl": "For signal handling support when using the StreamSelectLoop"
},
"type": "library",
"autoload": {
"psr-4": {
"React\\EventLoop\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Christian Lück",
"email": "christian@clue.engineering",
"homepage": "https://clue.engineering/"
},
{
"name": "Cees-Jan Kiewiet",
"email": "reactphp@ceesjankiewiet.nl",
"homepage": "https://wyrihaximus.net/"
},
{
"name": "Jan Sorgalla",
"email": "jsorgalla@gmail.com",
"homepage": "https://sorgalla.com/"
},
{
"name": "Chris Boden",
"email": "cboden@gmail.com",
"homepage": "https://cboden.dev/"
}
],
"description": "ReactPHP's core reactor event loop that libraries can use for evented I/O.",
"keywords": [
"asynchronous",
"event-loop"
],
"support": {
"issues": "https://github.com/reactphp/event-loop/issues",
"source": "https://github.com/reactphp/event-loop/tree/v1.5.0"
},
"funding": [
{
"url": "https://opencollective.com/reactphp",
"type": "open_collective"
}
],
"time": "2023-11-13T13:48:05+00:00"
},
{
"name": "react/stream",
"version": "v1.3.0",
"source": {
"type": "git",
"url": "https://github.com/reactphp/stream.git",
"reference": "6fbc9672905c7d5a885f2da2fc696f65840f4a66"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/reactphp/stream/zipball/6fbc9672905c7d5a885f2da2fc696f65840f4a66",
"reference": "6fbc9672905c7d5a885f2da2fc696f65840f4a66",
"shasum": ""
},
"require": {
"evenement/evenement": "^3.0 || ^2.0 || ^1.0",
"php": ">=5.3.8",
"react/event-loop": "^1.2"
},
"require-dev": {
"clue/stream-filter": "~1.2",
"phpunit/phpunit": "^9.5 || ^5.7 || ^4.8.35"
},
"type": "library",
"autoload": {
"psr-4": {
"React\\Stream\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Christian Lück",
"email": "christian@clue.engineering",
"homepage": "https://clue.engineering/"
},
{
"name": "Cees-Jan Kiewiet",
"email": "reactphp@ceesjankiewiet.nl",
"homepage": "https://wyrihaximus.net/"
},
{
"name": "Jan Sorgalla",
"email": "jsorgalla@gmail.com",
"homepage": "https://sorgalla.com/"
},
{
"name": "Chris Boden",
"email": "cboden@gmail.com",
"homepage": "https://cboden.dev/"
}
],
"description": "Event-driven readable and writable streams for non-blocking I/O in ReactPHP",
"keywords": [
"event-driven",
"io",
"non-blocking",
"pipe",
"reactphp",
"readable",
"stream",
"writable"
],
"support": {
"issues": "https://github.com/reactphp/stream/issues",
"source": "https://github.com/reactphp/stream/tree/v1.3.0"
},
"funding": [
{
"url": "https://opencollective.com/reactphp",
"type": "open_collective"
}
],
"time": "2023-06-16T10:52:11+00:00"
},
{
"name": "sebastian/cli-parser",
"version": "1.0.1",
@ -3034,6 +3505,70 @@
],
"time": "2020-09-28T06:39:44+00:00"
},
{
"name": "spatie/phpunit-watcher",
"version": "1.23.6",
"source": {
"type": "git",
"url": "https://github.com/spatie/phpunit-watcher.git",
"reference": "c192fff763810c8378511bcf0069df4b91478866"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/phpunit-watcher/zipball/c192fff763810c8378511bcf0069df4b91478866",
"reference": "c192fff763810c8378511bcf0069df4b91478866",
"shasum": ""
},
"require": {
"clue/stdio-react": "^2.4",
"jolicode/jolinotif": "^2.2",
"php": "^7.2 | ^8.0 | ^8.1",
"symfony/console": "^5 | ^6",
"symfony/finder": "^5.4 | ^6",
"symfony/process": "^5.4 | ^6",
"symfony/yaml": "^5.2 | ^6",
"yosymfony/resource-watcher": "^2.0 | ^3.0"
},
"conflict": {
"symfony/console": "<5.2",
"yosymfony/resource-watcher": "<2.0"
},
"require-dev": {
"phpunit/phpunit": "^8.6 | ^9.0"
},
"bin": [
"phpunit-watcher"
],
"type": "library",
"autoload": {
"psr-4": {
"Spatie\\PhpUnitWatcher\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Freek Van der Herten",
"email": "freek@spatie.be",
"homepage": "https://spatie.be",
"role": "Developer"
}
],
"description": "Automatically rerun PHPUnit tests when source code changes",
"homepage": "https://github.com/spatie/phpunit-watcher",
"keywords": [
"phpunit-watcher",
"spatie"
],
"support": {
"issues": "https://github.com/spatie/phpunit-watcher/issues",
"source": "https://github.com/spatie/phpunit-watcher/tree/1.23.6"
},
"time": "2022-01-31T11:57:13+00:00"
},
{
"name": "symfony/console",
"version": "v5.4.32",
@ -3200,6 +3735,69 @@
],
"time": "2022-01-02T09:53:40+00:00"
},
{
"name": "symfony/finder",
"version": "v5.4.35",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
"reference": "abe6d6f77d9465fed3cd2d029b29d03b56b56435"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/abe6d6f77d9465fed3cd2d029b29d03b56b56435",
"reference": "abe6d6f77d9465fed3cd2d029b29d03b56b56435",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"symfony/deprecation-contracts": "^2.1|^3",
"symfony/polyfill-php80": "^1.16"
},
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\Finder\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/finder/tree/v5.4.35"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2024-01-23T13:51:25+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.28.0",
@ -3840,6 +4438,81 @@
],
"time": "2023-11-26T13:43:46+00:00"
},
{
"name": "symfony/yaml",
"version": "v5.4.35",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "e78db7f5c70a21f0417a31f414c4a95fe76c07e4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/e78db7f5c70a21f0417a31f414c4a95fe76c07e4",
"reference": "e78db7f5c70a21f0417a31f414c4a95fe76c07e4",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"symfony/deprecation-contracts": "^2.1|^3",
"symfony/polyfill-ctype": "^1.8"
},
"conflict": {
"symfony/console": "<5.3"
},
"require-dev": {
"symfony/console": "^5.3|^6.0"
},
"suggest": {
"symfony/console": "For validating YAML files using the lint command"
},
"bin": [
"Resources/bin/yaml-lint"
],
"type": "library",
"autoload": {
"psr-4": {
"Symfony\\Component\\Yaml\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Loads and dumps YAML files",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/yaml/tree/v5.4.35"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2024-01-23T13:51:25+00:00"
},
{
"name": "theseer/tokenizer",
"version": "1.2.2",
@ -3947,7 +4620,7 @@
},
{
"name": "woocommerce/monorepo-plugin",
"version": "dev-update/action-scheduler-3.7.2",
"version": "dev-trunk",
"dist": {
"type": "path",
"url": "../../packages/php/monorepo-plugin",
@ -4032,6 +4705,63 @@
"source": "https://github.com/Yoast/PHPUnit-Polyfills"
},
"time": "2023-06-06T20:28:24+00:00"
},
{
"name": "yosymfony/resource-watcher",
"version": "v3.0.0",
"source": {
"type": "git",
"url": "https://github.com/yosymfony/resource-watcher.git",
"reference": "2f197cee0231c06db865d4ad2d8d7cd3faead2f8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/yosymfony/resource-watcher/zipball/2f197cee0231c06db865d4ad2d8d7cd3faead2f8",
"reference": "2f197cee0231c06db865d4ad2d8d7cd3faead2f8",
"shasum": ""
},
"require": {
"php": ">=5.6",
"symfony/finder": "^2.7|^3.0|^4.0|^5.0"
},
"require-dev": {
"phpunit/phpunit": "^5.7",
"symfony/filesystem": "^2.7|^3.0|^4.0|^5.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
}
},
"autoload": {
"psr-4": {
"Yosymfony\\ResourceWatcher\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Victor Puertas",
"email": "vpgugr@gmail.com"
}
],
"description": "A simple resource watcher using Symfony Finder",
"homepage": "http://yosymfony.com",
"keywords": [
"finder",
"resources",
"symfony",
"watcher"
],
"support": {
"issues": "https://github.com/yosymfony/resource-watcher/issues",
"source": "https://github.com/yosymfony/resource-watcher/tree/master"
},
"time": "2020-06-10T14:58:36+00:00"
}
],
"aliases": [],
@ -4046,5 +4776,5 @@
"platform-overrides": {
"php": "7.4"
},
"plugin-api-version": "2.3.0"
"plugin-api-version": "2.6.0"
}

View File

@ -50,10 +50,14 @@
"test:e2e-pw": "USE_WP_ENV=1 pnpm playwright test --config=tests/e2e-pw/playwright.config.js",
"test:env:start": "pnpm env:test",
"test:php": "./vendor/bin/phpunit -c ./phpunit.xml",
"test:php:watch": "./vendor/bin/phpunit-watcher watch",
"test:metrics": "USE_WP_ENV=1 pnpm playwright test --config=tests/metrics/playwright.config.js",
"test:php:env": "wp-env run --env-cwd='wp-content/plugins/woocommerce' tests-cli vendor/bin/phpunit -c phpunit.xml --verbose",
"test:php:env:watch": "wp-env run --env-cwd='wp-content/plugins/woocommerce' tests-cli vendor/bin/phpunit-watcher watch --verbose",
"test:unit": "pnpm test:php",
"test:unit:watch": "pnpm test:php:watch",
"test:unit:env": "pnpm test:php:env",
"test:unit:env:watch": "pnpm test:php:env:watch",
"update-wp-env": "php ./tests/e2e-pw/bin/update-wp-env.php",
"watch:build": "pnpm --if-present --workspace-concurrency=Infinity --filter=\"$npm_package_name...\" --parallel '/^watch:build:project:.*$/'",
"watch:build:project": "pnpm --if-present run '/^watch:build:project:.*$/'",

View File

@ -6,18 +6,32 @@ This document discusses unit tests. See [the e2e README](https://github.com/wooc
- [WooCommerce Tests](#woocommerce-tests)
- [Table of contents](#table-of-contents)
- [Initial Setup](#initial-setup)
- [MySQL database](#mysql-database)
- [Setup instructions](#setup-instructions)
- [Set up Test Environment](#set-up-test-environment)
- [wp-env (recommended)](#wp-env-recommended)
- [Manual setup](#manual-setup)
- [Running Unit Tests](#running-unit-tests)
- [Troubleshooting](#troubleshooting)
- [Guide for Writing Unit Tests](#guide-for-writing-unit-tests)
- [Automated Tests](#automated-tests)
- [Code Coverage](#code-coverage)
## Initial Setup
## Set up Test Environment
### MySQL database
Before using the tests a test environment is needed to run against.
You can set up the local testing environment by either using `wp-env` or by installing the required software on your machine.
### wp-env (recommended)
Run the following command to set up the environment:
```sh
pnpm --filter=@woocommerce/plugin-woocommerce env:dev
```
### Manual setup
#### MySQL database
To run the tests, you need to create a test database. You can:
@ -26,7 +40,7 @@ To run the tests, you need to create a test database. You can:
- Use a solution like VVV - if you are using VVV you might need to `vagrant ssh` first
- Run a throwaway database in docker with this one-liner: `docker run --rm --name woocommerce_test_db -p 3306:3306 -e MYSQL_ROOT_PASSWORD=woocommerce_test_password -d mysql:8.0.32`. ( Use `tests/bin/install.sh woocommerce_tests root woocommerce_test_password 0.0.0.0` in next step)
### Setup instructions
#### Setup instructions
Once you have database, from the WooCommerce root directory "cd" into `plugins/woocommerce` directory and run the following:
@ -51,24 +65,50 @@ tests/bin/install.sh woocommerce_tests root root
## Running Unit Tests
Change to the plugin root directory and type:
To run the tests, you can use the following command:
```sh
vendor/bin/phpunit
pnpm --filter=@woocommerce/plugin-woocommerce test:unit:env
# or
pnpm --filter=@woocommerce/plugin-woocommerce test:unit # if you are not using wp-env
```
The tests will execute and you'll be presented with a summary.
You can run specific tests by providing the path and filename to the test class:
You can run specific tests by providing the `--filter` option. For example, to run only the tests in a specific class:
```sh
vendor/bin/phpunit tests/legacy/unit-tests/importer/product.php
pnpm --filter=@woocommerce/plugin-woocommerce test:unit:env -- --filter=TestClassName
```
For example, to test `WC_Admin_Tests_RemoteInboxNotifications_PluginVersionRuleProcessor` class:
```sh
pnpm --filter=@woocommerce/plugin-woocommerce test:unit:env -- --filter=WC_Admin_Tests_RemoteInboxNotifications_PluginVersionRuleProcessor
```
A text code coverage summary can be displayed using the `--coverage-text` option:
```sh
vendor/bin/phpunit --coverage-text
pnpm --filter=@woocommerce/plugin-woocommerce test:unit:env -- --coverage-text
```
You can also watch for changes and re-run tests automatically by using the following command:
```sh
pnpm --filter=@woocommerce/plugin-woocommerce test:unit:env:watch
```
By default, all tests will be run. You can also run specific tests by providing the `--filter` option. For example, to run only the tests in a specific class:
```sh
pnpm --filter=@woocommerce/plugin-woocommerce test:unit:env:watch -- --filter=TestClassName
```
or you can pass `--list-groups` to list all the available test groups:
```sh
pnpm --filter=@woocommerce/plugin-woocommerce test:unit:env:watch -- --list-groups
```
### Troubleshooting