Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an explicitly output error message to the test bootstrap file #89

Closed
johnbillion opened this issue Nov 8, 2017 · 2 comments
Closed

Comments

@johnbillion
Copy link
Contributor

Previously: #55

If the server's display_errors directive is set to Off and the user tries to run their unit tests without first running bash bin/install-wp-tests.sh ..., they'll be greeted with blank output.

The uncaught exception is good if you have access to the error logs, or think to look there, but an error message which is explicitly output (via echo) would be even better.

@johnbillion
Copy link
Contributor Author

Recommendation for the bootstrap template:

if ( ! file_exists( $_tests_dir . '/includes/functions.php' ) ) {
	echo "Could not find $_tests_dir/includes/functions.php, have you run bin/install-wp-tests.sh ?";
	exit( 1 );
}

@danielbachhuber
Copy link
Member

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants