Troubleshooting: Tests can't be run - dotherightthing/wpdtrt-plugin-boilerplate GitHub Wiki

Status

  • Stable @ 1.4.26

Trigger

yarn run test

Error message

If you have debugging enabled, a message similar to this will be output to debug.log:

Fatal error: Uncaught exception 'Exception' with message 'Could not find /var/folders/0y/31dr5mx52c98lmldc_zpw3w00000gn/T/wordpress-tests-lib/includes/functions.php, have you run bin/install-wp-tests.sh ?' in /Volumes/DanBackup/Websites/wpdtrt-gallery/tests/bootstrap.php:15

Explanation

This error indicates that the test framework has not been installed, and the test database not created.

Common causes

  • You have manually edited composer.json prior to a commit, then run composer update
  • You have restarted your machine or recovered from a partial crash
  • You have opened a new Terminal window (bash_profile issue)

Solution

Follow the steps to Run unit tests.