Skip to content

Commit

Permalink
fix test bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
torounit committed Apr 20, 2022
1 parent ee2c12b commit e903502
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 3 deletions.
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"phpcompatibility/phpcompatibility-wp": "*",
"squizlabs/php_codesniffer": "*",
"wp-coding-standards/wpcs": "*",
"wp-phpunit/wp-phpunit": "^5.9.3",

"yoast/phpunit-polyfills": "^1.0.1"
},
"autoload": {
Expand Down
50 changes: 49 additions & 1 deletion composer.lock

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

4 changes: 2 additions & 2 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

// Require composer dependencies.
require_once dirname( __DIR__ ) . '/../vendor/autoload.php';
require_once dirname( __DIR__ ) . '/vendor/autoload.php';

$_tests_dir = getenv( 'WP_TESTS_DIR' );

Expand Down Expand Up @@ -50,7 +50,7 @@
* Manually load the plugin being tested.
*/
function _manually_load_plugin() {
require dirname( dirname( dirname( __FILE__ ) ) ) . '/advanced-posts-blocks.php';
require dirname( dirname( __FILE__ ) ) . '/schedule-terms.php';
}
tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );

Expand Down

0 comments on commit e903502

Please sign in to comment.