(WP-CLI) Wordpress-Tests_Lib files not being created
I had this problem and here is what you might try:
Confirm that
/tmp/wordpress-tests-lib
is missing theincludes
directory.Confirm that you have svn installed on the machine. If not run
sudo apt-get install subversion
Delete the
/tmp/wordpress-tests-lib
folderInside your plugin directory open up the
bin/install-wp-tests.sh
file and remove the quiet flag on the Subversion call. Change this line:svn co --quiet https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/includes/ $WP_TESTS_DIR/includestosvn co https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/includes/ $WP_TESTS_DIR/includes
Run the install shell script command again.
You should now be able to run PHPUnit and see the one default test passes.
I was having the same issue; resolved it by following the instructions here: https://github.com/wp-cli/wp-cli/wiki/Plugin-Unit-Tests . Specifically, I needed to initialize the testing environment.
bash bin/install-wp-tests.sh wordpress_test root '' localhost latest
where wordpress_test
is test database, root
is DB user and ''
contains password.
Further Resources: