WordPress already has an automated testing suite. What you see here is an alternative testing framework, with the following goals:
- runs every test case in a clean WordPress install
- uses the default PHPUnit runner, instead of custom one
- doesn't encourage or support the usage of shared/prebuilt fixtures
It uses SQL transactions to clean up automatically after each test.
- Clone the project.
- Edit the config. USE A NEW DATABASE, BECAUSE ALL THE DATA INSIDE WILL BE DELETED.
- $ phpunit all
- $ phpunit test_test.php