fix: add require `autoload.php` on test bootstrap to include phpunit-polyfills

This commit is contained in:
vnmedeiros 2022-01-26 08:48:35 -03:00
parent 6a41fa2179
commit 9c03be57bf
3 changed files with 4 additions and 4 deletions

View File

@ -11,7 +11,7 @@
},
"require-dev": {
"squizlabs/php_codesniffer": "^2.2 || ^3.0.2",
"yoast/phpunit-polyfills": "^1.0.1"
"yoast/phpunit-polyfills": "^1.0"
},
"prefer-stable" : true,
"minimum-stability": "dev",

4
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "9a50d78655731555071e552968158d04",
"content-hash": "d992085bca26ce8848677373c5cc0080",
"packages": [
{
"name": "kornrunner/blurhash",
@ -2214,5 +2214,5 @@
"prefer-lowest": false,
"platform": [],
"platform-dev": [],
"plugin-api-version": "2.1.0"
"plugin-api-version": "2.2.0"
}

View File

@ -29,8 +29,8 @@ function _manually_load_plugin() {
tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
// Start up the WP testing environment.
require_once dirname( dirname( __FILE__ ) ) . '/src/vendor/autoload.php';
require $_tests_dir . '/includes/bootstrap.php';
require_once(__DIR__ . '/factories/class-tainacan-entity-factory.php');
require_once( __DIR__ . '/factories/class-tainacan-metadatum-factory.php' );
require_once(__DIR__ . '/factories/class-tainacan-filter-factory.php');