Install WordPress and the WP Unit Test lib using the install.sh script. Change to the framework root directory and type:
$ tests/bin/install.sh <db-name> <db-user> <db-password> [db-host] [wp-version]
Sample usage:
$ tests/bin/install.sh wpemerge_tests root root localhost 4.8
Important: Make sure that the <db-name> database exists and it contains no information. All data inside it will be removed during testing!
- Install PHPUnit globally using
composer require phpunit/phpunit. - Run
phpunitin the root directory of the framework.
Refer to the phpunit command line test runner reference for more information and command line options.