Skip to content

Commit 3622a12

Browse files
committed
Improve PHPUnit test infrastructure for the Plugin Directory.
Add a dedicated wp-env test configuration so Plugin Directory tests run in the tests-cli container with PHPUnit 11 and Yoast Polyfills. Props dd32, obenland. Closes WordPress#588 git-svn-id: https://meta.svn.wordpress.org/sites/trunk@14810 74240141-8908-4e6f-9713-ba540dce6ec7
1 parent 31cc6bb commit 3622a12

8 files changed

Lines changed: 2582 additions & 3 deletions

File tree

.github/workflows/unit-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ jobs:
6868
phpunit-args: "--no-configuration --bootstrap phpunit/bootstrap.php phpunit/tests/"
6969
- name: Plugin Directory
7070
working-directory: environments
71-
wp-env-args: "--config plugin-directory/.wp-env.json"
72-
container: cli
71+
wp-env-args: "--config plugin-directory/.wp-env.test.json"
72+
container: tests-cli
7373
plugin-name: plugin-directory
7474
steps:
7575
- uses: actions/checkout@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules/
22
vendor/
3+
.phpunit.result.cache
34
.svn/

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
"dealerdirect/phpcodesniffer-composer-installer": "^1.0.0",
1313
"wp-coding-standards/wpcs": "^3.3.0",
1414
"phpcompatibility/phpcompatibility-wp": "*",
15-
"sirbrillig/phpcs-changed": "^2.12.0"
15+
"sirbrillig/phpcs-changed": "^2.12.0",
16+
"phpunit/phpunit": "^11.0",
17+
"yoast/phpunit-polyfills": "^4.0"
1618
},
1719
"scripts": {
1820
"lint": "phpcs",

0 commit comments

Comments
 (0)