@@ -15,26 +15,41 @@ The testing matrix is designed to validate the plugin against various combinatio
1515### PHPUnit Version Requirements
1616
1717| PHPUnit Version | PHP Requirement | WordPress Compatibility | Configuration File |
18- | ----------------| -----------------| ------------------------| -------------------|
19- | PHPUnit 9.x | PHP 7.3+ | All versions | phpunit.xml.dist |
20- | PHPUnit 8.x | PHP 7.2+ | All versions | phpunit.xml.legacy |
21- | PHPUnit 7.x | PHP 7.1+ | WP 4.9 - 6.x | phpunit.xml.legacy |
18+ | ----------------- | -----------------| ------------------------- | - -------------------|
19+ | PHPUnit 9.x | PHP 7.3+ | All versions | phpunit.xml.dist |
20+ | PHPUnit 8.x | PHP 7.2+ | All versions | phpunit.xml.legacy |
21+ | PHPUnit 7.x | PHP 7.1+ | WP 4.9 - 6.x | phpunit.xml.legacy |
2222
2323### WordPress Version Requirements
2424
2525| WordPress Version | Minimum PHP | Recommended PHP |
26- | ------------------| -------------| -----------------|
27- | 6.7 (latest) | 7.2.24 | 8.0+ |
28- | 6.4 - 6.6 | 7.2.24 | 8.0+ |
29- | 6.0 - 6.3 | 7.2.24 | 7.4+ |
30- | 5.9 | 7.2.24 | 7.4+ |
31- | 5.5 - 5.8 | 7.2.0 | 7.4+ |
26+ | ------------------- | -------------| -----------------|
27+ | trunk | 7.2.24 | 8.0+ |
28+ | 6.4 - 6.9 | 7.2.24 | 8.0+ |
29+ | 6.0 - 6.3 | 7.2.24 | 7.4+ |
30+ | 5.9 | 7.2.24 | 7.4+ |
31+ | 5.5 - 5.8 | 7.2.0 | 7.4+ |
3232
3333## Test Matrix Configuration
3434
3535The GitHub Actions workflow (` .github/workflows/phpunit-ci.yml ` ) runs tests across the following combinations:
3636
37- ### Latest WordPress (6.7+)
37+ ### WordPress trunk (development)
38+
39+ - PHP 8.3 + PHPUnit 9
40+
41+ ### WordPress 6.9
42+
43+ - PHP 8.3 + PHPUnit 9
44+ - PHP 8.2 + PHPUnit 9
45+
46+ ### WordPress 6.8
47+
48+ - PHP 8.3 + PHPUnit 9
49+ - PHP 8.2 + PHPUnit 9
50+ - PHP 8.1 + PHPUnit 9
51+
52+ ### Latest WordPress (6.7)
3853
3954- PHP 8.3 + PHPUnit 9
4055- PHP 8.2 + PHPUnit 9
@@ -111,6 +126,54 @@ bash bin/install-wp-tests.sh wordpress_test wp wp localhost $WP_VERSION
111126./vendor/bin/phpunit
112127```
113128
129+ ### Running Specific Test Groups
130+
131+ Tests are organized using PHPUnit groups for easy filtering:
132+
133+ ** Run all upload path tests:**
134+
135+ ``` bash
136+ ./vendor/bin/phpunit --group=upload
137+ ```
138+
139+ ** Run tests by ticket number:**
140+
141+ ``` bash
142+ ./vendor/bin/phpunit --group=136
143+ ```
144+
145+ ** Run specific test groups:**
146+
147+ ``` bash
148+ # Files rewriting tests
149+ ./vendor/bin/phpunit --group=files-rewriting
150+
151+ # Multisite configuration tests
152+ ./vendor/bin/phpunit --group=multisite
153+
154+ # Subdirectory installation tests
155+ ./vendor/bin/phpunit --group=subdirectory
156+ ```
157+
158+ ** Run a single test class:**
159+
160+ ``` bash
161+ ./vendor/bin/phpunit tests/integration/tests/test-upload-paths.php
162+ ```
163+
164+ ** Run a specific test method:**
165+
166+ ``` bash
167+ ./vendor/bin/phpunit --filter test_upload_path_without_duplication
168+ ```
169+
170+ ** Verbose and debug output:**
171+
172+ ``` bash
173+ ./vendor/bin/phpunit --group=upload --verbose
174+ ./vendor/bin/phpunit --group=upload --debug
175+ ```
176+
114177### Testing with Docker
115178
116179You can test different PHP versions using Docker:
0 commit comments