Skip to content

Commit

Permalink
Merge pull request #119 from humanmade/fix-travis
Browse files Browse the repository at this point in the history
Add support for returning `WP_Error` objects
  • Loading branch information
roborourke authored Sep 13, 2022
2 parents e8b1e9a + 3b552eb commit 87ff25e
Show file tree
Hide file tree
Showing 8 changed files with 185 additions and 63 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tests/tests/class-wp-core-cron.php
.phpunit.result.cache
composer.lock
vendor/
15 changes: 8 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
language: php
php:
- 7.1
- 7.2
- 7.3
- 7.4
- 8.0
- 8.1
env:
- WP_VERSION=latest WP_MULTISITE=0
- WP_VERSION=latest WP_MULTISITE=1
matrix:
include:
- php: 7.3
- php: 8.0
env: WP_VERSION=trunk WP_MULTISITE=0
- php: 7.3
- php: 8.0
env: WP_VERSION=trunk WP_MULTISITE=1
allow_failures:
- php: 8.1
services:
- mysql
install:
- composer install
- bash tests/install-tests.sh wordpress_test root '' 127.0.0.1 $WP_VERSION
script:
# 32656 tests are related to the pre_*_event filters which we're using already
- vendor/bin/phpunit --exclude-group 32656
- vendor/bin/phpunit
notifications:
email: false
11 changes: 8 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@
}
],
"require": {
"composer/installers": "~1.0"
"composer/installers": "^1.0 || ^2.0"
},
"require-dev": {
"humanmade/coding-standards": "dev-master",
"phpunit/phpunit": "7.1"
"phpunit/phpunit": "^7.1 || ^9.0",
"yoast/phpunit-polyfills": "^1.0"
},
"config": {
"allow-plugins": {
"composer/installers": true
}
}
}
1 change: 1 addition & 0 deletions inc/class-job.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public function save() {

self::flush_query_cache();
wp_cache_set( "job::{$this->id}", $this, 'cavalcade-jobs' );
return (bool) $result;
}

public function delete( $options = [] ) {
Expand Down
Loading

0 comments on commit 87ff25e

Please sign in to comment.