Skip to content

Commit

Permalink
added ArraySubsetAsserts polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
hybridwebdev committed Aug 16, 2023
1 parent c11b252 commit 52229bb
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 8 deletions.
1 change: 1 addition & 0 deletions bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

$dir = dirname( __FILE__ );

require("{$dir}/vendor/dms/phpunit-arraysubset-asserts/assertarraysubset-autoload.php");
require "{$dir}/vendor/yoast/phpunit-polyfills/phpunitpolyfills-autoload.php";
require_once "{$dir}/includes/bootstrap.php";
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
}
],
"require-dev": {
"yoast/phpunit-polyfills": "2.0"
"yoast/phpunit-polyfills": "2.0",
"dms/phpunit-arraysubset-asserts": "^0.5.0"
}
}
58 changes: 51 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions includes/abstract-testcase.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@
*
* All WordPress unit tests should inherit from this class.
*/

abstract class WP_UnitTestCase_Base extends PHPUnit_Adapter_TestCase {

use DMS\PHPUnitExtensions\ArraySubset\ArraySubsetAsserts;

protected static $forced_tickets = array();
protected $expected_deprecated = array();
protected $caught_deprecated = array();
Expand Down

0 comments on commit 52229bb

Please sign in to comment.