Skip to content

Commit 1025380

Browse files
committed
Improve error message
This will help new users realise that they need to run install-wp-tests.sh before running the tests.
1 parent ef24e84 commit 1025380

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

templates/plugin-bootstrap.mustache

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ if ( ! $_tests_dir ) {
1010
$_tests_dir = '/tmp/wordpress-tests-lib';
1111
}
1212

13+
if ( ! file_exists( $_tests_dir . '/includes/functions.php' ) ) {
14+
throw new Exception( "Could not find $_tests_dir/includes/functions.php, have you run bin/install-wp-tests.sh ?" );
15+
}
16+
1317
// Give access to tests_add_filter() function.
1418
require_once $_tests_dir . '/includes/functions.php';
1519

0 commit comments

Comments
 (0)