Skip to content

Commit 6ac3a07

Browse files
authored
Phpunit Upgrade (fixes #188) (#196)
And improving some unit tests
1 parent 858c7ca commit 6ac3a07

27 files changed

+1151
-3200
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ wp-cli.local.yml
1515
/coverage
1616
/.parcel-cache
1717
/babel.config.json
18+
/.phpunit.result.cache
1819

1920
/lib/vendor
2021

.travis.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -24,30 +24,30 @@ env:
2424
- WP_DB_NAME=wp_tests
2525
- WP_VERSION=*
2626
- CF7_VERSION=v5.5.3
27+
- PHPUNIT_VERSION=*
2728

2829
php:
2930
- 8.0
30-
- 7.4
3131
- 7.3
32-
- 7.2
3332

3433
jobs:
3534
fast_finish: true
3635
include:
37-
- name: legacy
36+
- name: php_7_2
3837
php: 7.2
39-
env: WP_VERSION=5.4 CF7_VERSION=v5.1.6
38+
env: PHPUNIT_VERSION=^7.0
39+
- name: php_7_2_and_wp_5_4
40+
php: 7.2
41+
env: WP_VERSION=5.4.9 CF7_VERSION=v5.1.6 PHPUNIT_VERSION=^7.0
4042
- name: bleeding edge
4143
php: 8.1.0
4244
dist: focal
4345
env: CF7_VERSION=master
44-
allow_failures:
45-
- name: bleeding edge
4646

4747
install:
4848
- composer validate
49-
- composer require --ignore-platform-reqs --dev roots/wordpress:${WP_VERSION} wp-phpunit/wp-phpunit:${WP_VERSION}
50-
- composer install --ignore-platform-reqs
49+
- composer require --dev --with-dependencies roots/wordpress:${WP_VERSION} wp-phpunit/wp-phpunit:${WP_VERSION} phpunit/phpunit:${PHPUNIT_VERSION}
50+
- composer install
5151
- composer show
5252
- nvm install 12 && nvm use 12
5353
- yarn install

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121
"symfony/http-foundation": "5.2.4"
2222
},
2323
"require-dev": {
24-
"phpunit/phpunit": "7.5.20",
2524
"roots/wordpress": "5.9",
2625
"wp-phpunit/wp-phpunit": "5.9.0",
2726
"yoast/phpunit-polyfills": "1.0.3"
2827
},
2928
"scripts": {
3029
"test": "phpunit",
3130
"install-test": "composer install --ignore-platform-reqs",
32-
"test-install": "composer install --ignore-platform-reqs && git update-index --assume-unchanged vendor/composer/autoload_* vendor/composer/installed.json"
31+
"install-prod": "composer install --ignore-platform-reqs --no-dev",
32+
"test-install": "composer install --ignore-platform-reqs && git update-index --assume-unchanged vendor/composer/autoload_*"
3333
},
3434
"config": {
3535
"allow-plugins": {

0 commit comments

Comments
 (0)