Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 727 Bytes

README.md

File metadata and controls

23 lines (16 loc) · 727 Bytes

Rationale

WordPress already has an automated testing suite. What you see here is an alternative testing framework, with the following goals:

  • faster
  • 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.

Requirements

  • WordPress 3.5-alpha
  • phpunit

Installation

  1. Clone the project.
  2. Copy unittests-config-sample.php to unittests-config.php.
  3. Edit the config. USE A NEW DATABASE, BECAUSE ALL THE DATA INSIDE WILL BE DELETED.
  4. $ phpunit all
  5. $ phpunit test_test.php